Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-25-2004, 05:53 AM
|
#1
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Rep:
|
permissions of my /home/"user" directory error
Quote:
philip@debian:~$ ls -l /home
drwxr-xr-x 39 500 500 4096 Sep 25 12:38 philip
|
Quote:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hdb1 / reiserfs defaults 0 0
/dev/hdb5 /home ext3 user,defaults,exec 0 0
/dev/hda2 /backup ext3 user 0 0
/dev/hdb8 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
/dev/hdd /burner iso9660 ro,user,noauto 0 0
|
I don't know when it happened but suddenly I don't have permissions in my /home directory anymore. If I make a directory for example I get a permission denied message and firefox can't download any files in there anymore. How do I fix it?
|
|
|
09-25-2004, 08:38 AM
|
#2
|
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320
Rep:
|
You shouldn't have write permission in /home, nor should it be owned by a user.
Your $HOME directory should be /home/philip, unless philip is the only user who will ever use this machine.
"chmod 755 /home" sets the typical permissions
"chown root.root /home" sets the typical ownership
|
|
|
09-25-2004, 01:01 PM
|
#3
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Original Poster
Rep:
|
Uhm I don't know what you mean exactly. If I do ls -l /home I get my user folder which is philip. If I do ls -l /home/philip I get the list of the contents of my home directory and it's about the directory itself. I wanted to show the permissions so that's why I posted that way
Quote:
debian:~# chmod 755 /home
debian:~# chown root.root /home
debian:~# exit
logout
philip@debian:~$ mkdir hello
mkdir: cannot create directory `hello': Permission denied
|
The problem is I think my permissions are OK and I didn't edit the fstab file but I can't create anything in my own home directory.
|
|
|
09-25-2004, 01:37 PM
|
#4
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
Not exactly related but you can use the -d option of ls if you want ls to show the directory instead of showing it's contents.
Code:
philip@debian:~$ ls -dl /home/philip
drwxr-xr-x 39 500 500 4096 Sep 25 12:38 philip
|
|
|
09-25-2004, 01:38 PM
|
#5
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
Are you sure your uid is 500?
|
|
|
09-25-2004, 01:46 PM
|
#6
|
Member
Registered: Jul 2004
Distribution: LFS 5.1
Posts: 161
Rep:
|
Try "/dev/hdb5 /home ext3 defaults 0 0" in your /etc/fstab.
/home should be mounted every time you boot your linux, so you don't need "user" option. "defaults" implies "exec" option.
Also, this is not right:
Code:
drwxr-xr-x 39 500 500 4096 Sep 25 12:38 philip
user/group = 500/500 instead of philip/philip means thay your user/group id is not 500/500, /home/philip is not yours!
|
|
|
09-25-2004, 01:50 PM
|
#7
|
Member
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188
Rep:
|
Did you delete the user philip be4 but did not remove the home directory? Or did you change the output to 500 on purpose?
|
|
|
09-25-2004, 02:44 PM
|
#8
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Original Poster
Rep:
|
Ok that's the error. How do I change the group of a directory?
|
|
|
09-25-2004, 04:46 PM
|
#9
|
Member
Registered: Jul 2004
Distribution: LFS 5.1
Posts: 161
Rep:
|
chown philip:philip /home/philip
|
|
|
09-25-2004, 09:42 PM
|
#10
|
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320
Rep:
|
If your username is "philip" and group name is "users", you can do, as root:
chown philip.users /home/philip
If there is a permissions issue with subdirectories of /home/philip, you can do it recursively:
chown -R philip.users /home/philip/
|
|
|
09-26-2004, 02:08 AM
|
#11
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Original Poster
Rep:
|
Thanks!
|
|
|
All times are GMT -5. The time now is 07:17 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|