LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   permissions of my /home/"user" directory error (https://www.linuxquestions.org/questions/linux-software-2/permissions-of-my-home-user-directory-error-235034/)

darkleaf 09-25-2004 05:53 AM

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?

mikshaw 09-25-2004 08:38 AM

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

darkleaf 09-25-2004 01:01 PM

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.

mirradric 09-25-2004 01:37 PM

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


mirradric 09-25-2004 01:38 PM

Are you sure your uid is 500?

Not now, John! 09-25-2004 01:46 PM

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!

mirradric 09-25-2004 01:50 PM

Did you delete the user philip be4 but did not remove the home directory? Or did you change the output to 500 on purpose?

darkleaf 09-25-2004 02:44 PM

Ok that's the error. How do I change the group of a directory?

Not now, John! 09-25-2004 04:46 PM

chown philip:philip /home/philip

mikshaw 09-25-2004 09:42 PM

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/

darkleaf 09-26-2004 02:08 AM

Thanks!


All times are GMT -5. The time now is 04:53 PM.