LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 09-25-2004, 05:53 AM   #1
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
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?
 
Old 09-25-2004, 08:38 AM   #2
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
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
 
Old 09-25-2004, 01:01 PM   #3
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Original Poster
Rep: Reputation: 45
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.
 
Old 09-25-2004, 01:37 PM   #4
mirradric
Member
 
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188

Rep: Reputation: 31
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
 
Old 09-25-2004, 01:38 PM   #5
mirradric
Member
 
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188

Rep: Reputation: 31
Are you sure your uid is 500?
 
Old 09-25-2004, 01:46 PM   #6
Not now, John!
Member
 
Registered: Jul 2004
Distribution: LFS 5.1
Posts: 161

Rep: Reputation: 30
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!
 
Old 09-25-2004, 01:50 PM   #7
mirradric
Member
 
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188

Rep: Reputation: 31
Did you delete the user philip be4 but did not remove the home directory? Or did you change the output to 500 on purpose?
 
Old 09-25-2004, 02:44 PM   #8
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Original Poster
Rep: Reputation: 45
Ok that's the error. How do I change the group of a directory?
 
Old 09-25-2004, 04:46 PM   #9
Not now, John!
Member
 
Registered: Jul 2004
Distribution: LFS 5.1
Posts: 161

Rep: Reputation: 30
chown philip:philip /home/philip
 
Old 09-25-2004, 09:42 PM   #10
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
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/
 
Old 09-26-2004, 02:08 AM   #11
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Original Poster
Rep: Reputation: 45
Thanks!
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
cant login. "no directory /home/chris!" qwijibow Linux - Newbie 5 02-26-2009 12:58 PM
Is "~/" assumed to be a user's home directory ColKurtz Linux - Newbie 3 01-25-2005 09:49 PM
"No write access to $HOME directory" Arthaus Linux - Newbie 2 01-12-2004 07:22 PM
Does anyone know the origin of using "~" to represent the user's home directory? GonzoJohn General 6 10-14-2003 03:42 PM
RH9 NIS login error: "home directory does not exist" airrr Linux - Networking 2 08-06-2003 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration