Results 1 to 7 of 7
Hellooooo,
I'm having problems maintaining the permissions of a directory. Every time I log in my computer I have to change the permissions of that directoty so that I can ...
- 10-19-2007 #1Linux User
- Join Date
- Jul 2007
- Location
- Greece
- Posts
- 277
permission issue
Hellooooo,

I'm having problems maintaining the permissions of a directory. Every time I log in my computer I have to change the permissions of that directoty so that I can access it.
I am using the command chmod -c 777 directory
Is there a way to keep the permissions on for ever, without having to change them all the time?
Thank you guys!!!
- 10-19-2007 #2Just Joined!
- Join Date
- Oct 2007
- Posts
- 37
I'm not sure what you use the -c for, but if you change the permissions, they'll stay that way unless a program, script, or another user changes it back.
What's the file you're modifying permissions for? And when the permissions change back, is the time stamp of the file the same as when you had changed the permissions?
try just: chmod 777 file
But be careful of 777 (you're giving write to other users and world)
- 10-19-2007 #3Linux User
- Join Date
- Jul 2007
- Location
- Greece
- Posts
- 277
Thank you for your reply papetova
I am changing the permissions of a simple file that contains photos.
But each time I log in I have to change the permissions again in order to see its contents.
Can you please tell me what do you mean exaclty by time stamp ??
- 10-19-2007 #4Just Joined!
- Join Date
- Oct 2007
- Posts
- 37
Time stamp is Sep 7 10:37AM for this file:
-rwxr-xr-x 1 root wheel 104B Sep 7 10:37 templist
I was thinking some program might me writing to it or modifying it which would change the timestamp.
What do you have as the owner and group of the file? And what user are you logged in with when trying to access it?
And is this a file or a folder?
- 10-19-2007 #5Linux User
- Join Date
- Jul 2007
- Location
- Greece
- Posts
- 277
Its a folder sorry its not a file like I said before.

This is the folder I am talking about:
drwxrwxrwx 11 root root 309 2007-10-19 15:54 photos/
I'm logging in as root to change the mode.
What do you have as the owner and group of the file?
How can I check
that?
thank you papetova
- 10-19-2007 #6Just Joined!
- Join Date
- Oct 2007
- Posts
- 37
Based on this:
drwxrwxrwx 11 root root 309 2007-10-19 15:54 photos/
The owner and group are both "root".
When you log in with your user name, are you using root?
If not, try changing the ownership of the file to your user, or add your username to the group "root".
You can do:
chown youruser:yourgroup photos/
Replace your userwith your username and yourgroup with your group.
You can type "whoami" to see what user you're logged in with.
- 10-19-2007 #7
Just a note... whenever you're doing something like this with a directory (chmod, chown... etc) you should run the command recursively for example:
chown is a little more complicated then chmod so if you're going to use it I'd read the "man page" or do a search on "how to use chown on directories" on google. To read the "man page" go into the command line and type man chown.Code:For chmod: sudo chmod -r directory For chown: sudo chown -R username directory


Reply With Quote