View previous topic :: View next topic |
Author |
Message |
Mossmoth n00b
Joined: 06 Nov 2011 Posts: 3
|
Posted: Sat Dec 03, 2011 8:45 pm Post subject: [SOLVED] Permission problems for regular user |
|
|
Hi! I'm quite new to Gentoo, but I have used Linux for a while though. My problem is this, my normal user is lacking some permissions. If I make a file, chmod it and try to execute it, I get persmission denied:
Code: |
leif@leif-PC ~ $ touch test.sh
leif@leif-PC ~ $ chmod 777 test.sh
leif@leif-PC ~ $ ls -l test.sh
-rwxrwxrwx 1 leif leif 14 Dec 3 21:35 test.sh
leif@leif-PC ~ $ ./test.sh
-bash: ./test.sh: Permission denied
|
I get this for all my executable files in /home, even though I chmod and chown them. Do you have any idea why I'm lacking executable permissions?
More info:
Code: |
leif@leif-PC ~ $ cat /etc/fstab
/dev/sda1 / ext3 defaults,noatime 0 1
/dev/sdb3 /home ext3 defaults,user,noatime 0 2
/dev/sdb1 none swap sw 0 0
/dev/hdc /mnt/cdrom auto noauto,ro,user 0 0
|
Code: |
leif@leif-PC ~ $ ls -l /home/
total 20
drwxrwxrwx 50 leif leif 4096 Dec 3 21:21 leif
|
Last edited by Mossmoth on Sat Dec 03, 2011 9:04 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sat Dec 03, 2011 8:53 pm Post subject: |
|
|
Mossmoth,
Welcome to Gentoo.
It sounds like you have /home mounted with the noexec option.
mount with no parameters will show your mounted filesystems and their mount options.
Code: | /dev/sdb3 /home ext3 defaults,user,noatime 0 2 | is a bit odd. You should not have the user option there.
Its intended for removable media to allow users to mount and umount it.
Your own users /home should be in /home/<username> and with the options you have in /etc/fstab it should work.
How did you create your normal user ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Last edited by NeddySeagoon on Sat Dec 03, 2011 8:53 pm; edited 1 time in total |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9695 Location: almost Mile High in the USA
|
Posted: Sat Dec 03, 2011 8:53 pm Post subject: |
|
|
The 'user' mount flag implies noexec nosuid and nodev. You'll need to add "exec" or remove the "user" mount flag in fstab/mount options.
You probably just need "noatime" for /home, no need for "defaults,user" for that line... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Mossmoth n00b
Joined: 06 Nov 2011 Posts: 3
|
Posted: Sat Dec 03, 2011 9:04 pm Post subject: |
|
|
Thanks for a very quick reply! I removed "user, defaults" from fstab, and everything works great! Can't remember why I put those in there anyway, hehe. Again, thanks alot! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|