LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-17-2009, 10:08 AM   #1
v333k
Member
 
Registered: Apr 2004
Location: 127.0.0.1
Posts: 38

Rep: Reputation: 15
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!
 
Old 04-17-2009, 10:19 AM   #2
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
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.
 
Old 04-17-2009, 10:20 AM   #3
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 214

Rep: Reputation: 35
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
 
Old 04-17-2009, 04:32 PM   #4
v333k
Member
 
Registered: Apr 2004
Location: 127.0.0.1
Posts: 38

Original Poster
Rep: Reputation: 15
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 View Post
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 View Post
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
 
Old 04-20-2009, 02:26 AM   #5
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 214

Rep: Reputation: 35
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
 
Old 04-20-2009, 02:34 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.
 
Old 04-20-2009, 09:36 AM   #7
v333k
Member
 
Registered: Apr 2004
Location: 127.0.0.1
Posts: 38

Original Poster
Rep: Reputation: 15
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!
 
Old 06-15-2009, 09:52 AM   #8
shahhe
Member
 
Registered: Nov 2003
Location: Chicago
Distribution: RHEL 5.4 on HP servers
Posts: 44

Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
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.
 
  


Reply

Tags
denied, permission


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Denied to Super User? EpicOfChaos Linux - Newbie 2 10-15-2008 10:28 AM
core dump permission denied m00n Linux - Security 5 11-03-2007 09:46 AM
whatever a non-root user does, he gets 'permission denied'. boazg Linux - Software 2 08-05-2005 08:17 AM
Permission denied for root user shujja Linux - Newbie 7 07-05-2005 03:29 AM
Permission denied using a user? SLACKER Alinuxnoob Linux - Newbie 7 10-05-2004 11:20 AM


All times are GMT -5. The time now is 03:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration