Not allowed to change mode even with root privileges
Solution 1
The reason this was happening was because the data wasn't actually stored in folder/, it was stored in a different location and was mounted to folder/. I had to find the real location of the data and change the mode there, which allowed me to remove the folder afterwords.
Solution 2
Before you can delete the folder, you need to unmount it with fusermount (encfs is a fuse-based filesystem):
fusermount -uz folder
The u
flag tells fuse to unmount, and the z
flag tells it to do it lazily (when no other operations are pending; usually works if normal unmount doesn't).
Solution 3
At first guess, I would say the file system you mounted and are extracting to has some issues. The mounted drive might be mounted read only? Or some other permissions issues related to the system you mounted. But I'm out of practice on telling you precisely what to do. Just pointing you in that direction. :) Hope it helps.
Related videos on Youtube
Nug U
Updated on September 18, 2022Comments
-
Nug U over 1 year
sudo chmod a+rwx folder/ [sudo] password for user: chmod: cannot access 'folder/': Permission denied
All I'm trying to do is delete the folder, but I can't figure out how to. I'm certain my password is fine.
I'll give what I think might be relevant but let me know if you have any questions.
- This folder is in another folder which I 'mounted' using encfs
- My account is the only account on this computer.
- This folder was originally in a zip file. I moved the zip file into the mounted drive and extracted it, and then deleted the zip file. (The extraction failed and the folder didn't come out how it should have, so I want to delete it.)
lsatr folder/
lsattr: Inappropriate ioctl for device While reading flags on subfolder/
-
Ayush Gupta over 7 yearspost result of
lsattr folder/
-
Zanna over 7 yearsdoes encfs support Linux file permissions?
-
Nug U over 7 yearslsattr: Inappropriate ioctl for device While reading flags on folder/subfolder1 lsattr: Inappropriate ioctl for device While reading flags on folder/subfolder2
-
Ayush Gupta over 7 yearsdo a simple
lsattr
then, while in the directory containingfolder
-
Zanna over 7 yearsthat error means the filesystem doesn't support extended permission attributes.
-
Ayush Gupta over 7 yearspost result of
cat /proc/mounts
-
Nug U over 7 yearsIt's very long. What's the best way to post it? I'll post the line that mentions the folder in question below
-
Nug U over 7 years
encfs /home/nug/Documents/top/folder/ fuse.encfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
-
Nug U over 7 yearsGot it. I'll post the solution
-
Nug U over 7 yearsPerfect. You helped me figure it out