LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Fedora Core 10 - user permissions (permission denied) (http://www.linuxquestions.org/questions/linux-general-1/fedora-core-10-user-permissions-permission-denied-719854/)

v333k 04-17-2009 10:08 AM

Fedora Core 10 - user permissions (permission denied)
 
Hi,
When I installed Fedora Core 10, and I created a user account called PS. Anything I do with this account I get a permission denied. I always have to switch to root in order for me to even save a file. What file do I need to change to give the account PS more permissions than it currently does?
I realize that this is most probably a simple and easy task but I am new to linux and still getting used to it.

thanks!

cmnorton 04-17-2009 10:19 AM

How did you create the account?
 
Is there a directory associated with the account, and what are its permissions and ownerships?

Your inability to use the account sounds something like a permissions/ownership issue.

fatra2 04-17-2009 10:20 AM

Hi there,

When you created your user account, did you asked for a home directory to be created with it???

Secondly, when you say that you "save a file", in which directory are you trying to save it into??? If you are not in your /home/"user"/ directory, then you most probably do not have write permission. If you are in your home folder, then it means that the permissions have not been set up right. In this case, you might want to verify if it's a permission or ownership problem. To do so type
Code:

ls -l
in you /home/"user" directory. You should see a list of files, with a owner and group associated to it. If it says
Quote:

root.root
then it's an ownership, that can be solved by, as root
Code:

chown -R user.group /home/user/
otherwise, also as root, the problem is permission to write to the folder. You can simply do
Code:

chmod -R 755 /home/user/
.

To be completely clear with these command: chown means "change the ownership of the folder", chmod means "change mode of files or folders" and the -R makes the command recursive to all the files and folders.

Hope this is helpful.

Cheers

v333k 04-17-2009 04:32 PM

Yes - there is a directory /home/ps/
Also Yes, I am trying to change ownership or permissions to the user ps so I can do things within my directory.

Quote:

Originally Posted by cmnorton (Post 3512285)
Is there a directory associated with the account, and what are its permissions and ownerships?

Your inability to use the account sounds something like a permissions/ownership issue.


fatra2,

I tried your code but it didn't work. I am not sure if I typed the correct commands.

This is what I did based on your suggestions. I am doing all this as root.

Code:

[root@localhost ps]# chown -R ps.ps /home/ps/
chown: cannot access '/homt/ps/.gvfs': Permission denied




Quote:

Originally Posted by fatra2 (Post 3512288)
Hi there,

When you created your user account, did you asked for a home directory to be created with it???

Secondly, when you say that you "save a file", in which directory are you trying to save it into??? If you are not in your /home/"user"/ directory, then you most probably do not have write permission. If you are in your home folder, then it means that the permissions have not been set up right. In this case, you might want to verify if it's a permission or ownership problem. To do so type
Code:

ls -l
in you /home/"user" directory. You should see a list of files, with a owner and group associated to it. If it says then it's an ownership, that can be solved by, as root
Code:

chown -R user.group /home/user/
otherwise, also as root, the problem is permission to write to the folder. You can simply do
Code:

chmod -R 755 /home/user/
.

To be completely clear with these command: chown means "change the ownership of the folder", chmod means "change mode of files or folders" and the -R makes the command recursive to all the files and folders.

Hope this is helpful.

Cheers


fatra2 04-20-2009 02:26 AM

Hi there,

You can try to see what is happening with your user account by typing, as root:
Code:

system-config-user
You should have a gui window appearing. There you can verify the parameters of your user and group.

Another thing, have you looked at thze permission of the /home/ folder. You need to make sure that you have all the access necessary. To do so, type:
Code:

ls -la /home/
Since I don't have a Linux version here with me, I can't make a display of what you should see. Not matter, the permission of the folders are written in to one the first columns in a 3 digit number (755 or 500).

A little explanation for these numbers. The first digit is the permission for the owner of the file (user). The second digit is the permission for the group of the file. The last digit sets the permission for the rest of the world.

Now about the numbering system. You have three types of permission: read(4)/write(2)/execute(1). The numbers in paratheses are the attribute to the permission. It is best to represent it with examples. If you want to have read/write access to your files, you need to set the permission to at least 6 (4 for read + 2 for write access) as the first digit. If you want your group to have read acess only on this file, you need to set the permission to 4 as the second digit. If you want the rest of the world to be able to execute you file, you must set the permission to 1 in the last digit. Therefore, your file's permission would 641. At last, if you want to give no rights to the world (for example) you set a 0.

Now if you want to change permissions on files or folders, you need to type, as root or the owner of the file:
Code:

chmod 751 files_to_be_changed
which would give read/write/execute to the owner, read/execute to the group, and execute to the rest of the world.

All of this to tell you to make sure that the owner of the /home/ folder should have at least read/write access to the files in this folder.

I hope this helps you a little bit more.

Cheers

jschiwal 04-20-2009 02:34 AM

Quote:

chown: cannot access '/homt/ps/.gvfs': Permission denied
This is normal. If the other files and directories in /home/ps are owned by ps, you should be in good shape.

v333k 04-20-2009 09:36 AM

great! I think I got it.
I did chmod 755 /home/ps/ and I think what I am looking for is there. Now, I have more write access when I am logged in as ps and not root.

Thanks everyone!

shahhe 06-15-2009 09:52 AM

Quote:

Originally Posted by jschiwal (Post 3514770)
This is normal. If the other files and directories in /home/ps are owned by ps, you should be in good shape.


Why is this normal?

Why does gnome set these permissions on the directory. I tried to change the permissions, but next time the user logs in they are changed back.

I just installed Fedora 10 on 2 systems and every night I get warning messages from my backup software (bacula) about "Permission denied" on these directories. I am sure it causes problem with other backup softwares.


All times are GMT -5. The time now is 11:39 PM.