Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/usr wont mount correctly at startup (Permission denied)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
dany74q
n00b
n00b


Joined: 17 Apr 2011
Posts: 8

PostPosted: Sun Aug 21, 2011 10:55 am    Post subject: /usr wont mount correctly at startup (Permission denied) Reply with quote

Hello everyone ,

I`ve just configured gentoo on my laptop , but I`m facing a problem with the mounting of the /usr partition at startup .
The system boots , but prompts "permission denied" when it tries to fire off software which is located in /usr/bin/ or /usr/sbin/ ...
Stuff as the logger and wpa_supplicant which I use for to manage the WPA2 key exchange wont fire up at startup .

If one were to manually remount the /usr partition - all works well (umount /dev/sda5 ; mount -t ext4 /dev/sda5 /usr) ,
so I`m guessing `tis a problem in the fstab file .

/etc/fstab :

/dev/sda1 /boot ext4 defaults,noauto,noatime 1 2
/dev/sda7 / ext4 noatime 0 1
/dev/sda6 /home ext4 noatime,user 0 0
/dev/sda5 /usr ext4 noatime,user 0 0
/dev/sda2 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto defaults,noauto,user
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

For example , if one would try to execute "clear" command which is located at /usr/bin/clear
he`d get : "-bash: /usr/bin/clear: Permission denied"
That is if the partitions was not remounted manually after startup .

How should I handle this ?
Thanks ,

Danny .
Back to top
View user's profile Send private message
g0del
n00b
n00b


Joined: 27 Jul 2011
Posts: 36

PostPosted: Sun Aug 21, 2011 11:19 am    Post subject: Reply with quote

Permission denied usually happens when exec in not used in mounting the partition try
Code:
/dev/sda5 /usr ext4 noatime,user,exec 0 0
Back to top
View user's profile Send private message
dany74q
n00b
n00b


Joined: 17 Apr 2011
Posts: 8

PostPosted: Sun Aug 21, 2011 11:32 am    Post subject: Reply with quote

g0del wrote:
Permission denied usually happens when exec in not used in mounting the partition try
Code:
/dev/sda5 /usr ext4 noatime,user,exec 0 0


Thank you my friend , that seem to have solved the case .
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Sun Aug 21, 2011 11:33 am    Post subject: Reply with quote

As g0del pointed out, you need to add exec. The user option is causing it to be mounted noexec
From man page
Quote:
user
Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Aug 21, 2011 5:23 pm    Post subject: Reply with quote

In general, you should only put the user mount option on filesystems that are noauto and describe removable media such as USB storage devices or optical media.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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