LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2004, 01:57 PM   #1
Okashira
LQ Newbie
 
Registered: Jan 2004
Posts: 4

Rep: Reputation: 0
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.

-Seppe
 
Old 01-12-2004, 02:14 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
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.

Cool
 
Old 01-12-2004, 03:21 PM   #3
Okashira
LQ Newbie
 
Registered: Jan 2004
Posts: 4

Original Poster
Rep: Reputation: 0
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.

-Seppe
 
Old 01-12-2004, 03:26 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
FAT32 doesn't support Linux-style permissions.
 
Old 01-12-2004, 05:34 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

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

Cool
 
Old 01-12-2004, 06:11 PM   #6
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using chmod to recursively change directories / files [GOD]Anck Linux - Software 6 11-10-2008 07:16 PM
file permissions not being remembered for SAMBA printer files/directories Avatar Linux - General 0 08-30-2005 02:44 PM
set file permissions for 100 directories & its files cevjr Linux - Security 6 01-06-2005 11:23 AM
change file permissions recursivly without changing permission of directories eNTi Linux - Software 8 10-15-2004 04:37 PM
permissions for group files/directories transferred from Netware mweil Linux - Newbie 1 07-01-2004 11:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration