-   Linux - Newbie (
-   -   How do I change permissions of files/directories? (

Okashira 01-12-2004 01:57 PM

How do I change permissions of files/directories?
Hello again,

I just created a user account for my mom and would like to set it so that she can't access any of my personal files. I used the commands
chmod o-r <directory name>
chmod o-r -R <directory name>
chmod o-rwx <directory name>
chmod o-rwx -R <directory name>
None of those commands worked. Instead, I received the message "Operation not permitted". And yes, I was logged in as root. Can someone please tell me what I'm doing wrong and how I can change the permissions. Thanks a lot.


MasterC 01-12-2004 02:14 PM

Hi :)

Assuming you simply want these files inaccessible by anyone besides yourself and root, here's the commands I'd use:
chown -R yourusername.root /path/to/directory
chmod -R 700 /path/to/directory

This should give you full control over your files and directories while still maintaining inaccessibility by anyone else other than root.


Okashira 01-12-2004 03:21 PM

Thanks for the advice, however, it did not work.

I used the chmod command and was able to change the permissions on one of my files in my /home/username directory, so I know I'm typing it in correctly and my computer's not broken.

I want to change the permission of a directory that is located on a different partition on my hard drive than linux is (a fat32 partition to be exact) under /mnt

Does that make a difference? Perhaps that would explain why I can change permissions in my /home/username directory, but not for the one I want. Thanks for any help anyone can give me.


slakmagik 01-12-2004 03:26 PM

FAT32 doesn't support Linux-style permissions.

MasterC 01-12-2004 05:34 PM

You can either set permissions for the entire partition during mounting, or you can move the files to a Linux filesystem.


aaa 01-12-2004 06:11 PM

To set permissions on Windows drives, use gid=*,uid=*, and umask=* in the /etc/fstab file.
Search here for more info.

All times are GMT -5. The time now is 06:02 PM.