Sobes.tech
Junior — Middle

What could be the reasons if another user uses the same terminal, has disk space and RAM, but cannot create folders?

sobes.tech AI

Answer from AI

The reasons why a user cannot create folders despite having free space and memory may be related to access rights. For example:

  • Lack of write permissions in the current directory (insufficient filesystem permissions).
  • Restrictions at the ACL or SELinux/AppArmor level blocking the creation of new directories.
  • Reached the limit on the number of files or folders in the directory (e.g., inode limit).
  • The filesystem is mounted in read-only mode.

You can check using commands like ls -ld <path>, mount, and df -i for inodes, as well as by reviewing permissions and security policies.

sobes.tech AI

Answer from AI

Lack of write permissions in the current directory or in the intended location for creating a folder.

# Check access rights to the current directory
ls -ld .

Lack of execute permission (execute) on the parent directory.

# Check access rights to the parent directory
ls -ld ..

Restrictions imposed by ACL (Access Control Lists).

# Check for ACL presence
getfacl .

The filesystem is mounted in read-only mode.

# Check mount mode
mount | grep /path/to/directory

Corruption of the filesystem or inode issues.

# To check the filesystem, a reboot or unmounting daemon may be required
# fsck /dev/sdX

Disk space quota restrictions for the user or group.

# Check quotas
quota -v

Immutable attribute (immutable) present on the directory.

# Check attributes
lsattr .
# Remove immutable attribute (requires superuser)
# chattr -i .

Working directory is on a network resource with write restrictions.

Presence of special security modules (e.g., SELinux or AppArmor) with policies that prohibit creating files/directories.

# Check SELinux status
sestatus
# Check SELinux mode
getenforce

System or process failures blocking access to the filesystem.