Having Trouble Changing File and Folder Permissions on Linux

0
14
Asked By TechWanderer21 On

I'm running into a problem where I can't modify the permissions of folders or files in Dolphin, Nautilus, or by using the chmod command as root. I'm using Arch Linux and have never experienced this issue before. Is there a bug, or have I somehow messed up my system? I've tried changing permissions in Dolphin, but they don't save. In Nautilus, as soon as I adjust the permissions, they revert back, and I'm also unable to change the ownership. Using sudo chmod doesn't seem to work either. Any ideas?

3 Answers

Answered By LinuxGuru88 On

Also, make sure the filesystem isn't mounted read-only. If it is, any changes you're trying to make will fail. Use `mount | grep ' ro,'` to check. If you see 'ro', that could explain why you can't change permissions. You’ll need to remount it as read-write to change anything.

CuriousCat45 -

Good point! I remember my drive was read-only once because the system detected errors.

Answered By HelpSeeker42 On

You should also check if any immutable attributes are set on the files. Run `lsattr /path/to/file` to see if 'i' is flagged. If it is, that means the file can't be altered. You can remove this with `sudo chattr -i /path/to/file`, then try changing the permissions again.

NTFSExplorer -

Oh, that's a neat trick! I didn't know about the immutable attribute. I’ll definitely check that!

Answered By CodeWizard3000 On

First off, check what filesystem you're using. If it's NTFS or exFAT, that might be the issue. These filesystems don't support Unix permissions, which means chmod and chown won't work as you'd expect. You can confirm this by running the command `df -T /path/to/your/folder`. If it returns ntfs or exfat, then that’s why your changes aren’t sticking.

FileFixer99 -

Yeah, I had a similar issue with an NTFS drive. Once I realized it doesn’t support Unix permissions, everything made sense!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.