View previous topic :: View next topic |
Author |
Message |
gouranga Tux's lil' helper

Joined: 05 Aug 2005 Posts: 113
|
Posted: Sun Oct 28, 2007 8:50 am Post subject: Made a bind mount of /usr ,normal user can't exec ..[solved] |
|
|
Original topic wrote: | Made a bind mount of /usr ,normal user can't exec /usr/bin/ |
I ran out of space on my hard disk, so I decided to move a few folders and work with bind mounts.
extract /etc/fstab/: | /mnt/hdb2/home /home none bind 0 0
/mnt/hdb2/opt /opt none bind 0 0
/mnt/hdb2/usr /usr none bind 0 0
/mnt/hdb2/portage /usr/portage none bind 0 0 |
Everything went smoothly, until I decided to move the /usr/ folder.
For user root everything is ok, normal users can't execute fe the command startx, and various other commands.
All the commands a normal user can't execute are in the folder /usr/bin/ (root:root rwx --- ---).
Since I copied the folder with option -r , I thought all permission would be preserved.
Anyone any thought what I did wrong and how I can solve it?
Last edited by gouranga on Thu Dec 27, 2007 7:18 pm; edited 1 time in total |
|
Back to top |
|
 |
toralf Developer


Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Sun Oct 28, 2007 9:19 am Post subject: |
|
|
Have a look for the umask option of mount. |
|
Back to top |
|
 |
tarpman Veteran


Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Sun Oct 28, 2007 3:40 pm Post subject: |
|
|
man 1p cp wrote: | -p Duplicate the following characteristics of each source file in
the corresponding destination file:
1. The time of last data modification and time of last access.
If this duplication fails for any reason, cp shall write a
diagnostic message to standard error.
2. The user ID and group ID. If this duplication fails for any
reason, it is unspecified whether cp writes a diagnostic
message to standard error.
3. The file permission bits and the S_ISUID and S_ISGID bits.
Other, implementation-defined, bits may be duplicated as
well. If this duplication fails for any reason, cp shall
write a diagnostic message to standard error.
If the user ID or the group ID cannot be duplicated, the file permis-
sion bits S_ISUID and S_ISGID shall be cleared. If these bits are
present in the source file but are not duplicated in the destination
file, it is unspecified whether cp writes a diagnostic message to stan-
dard error. |
man 1p cp wrote: | -r Copy file hierarchies. The treatment of special files is imple-
mentation-defined. |
In short, no, cp -r is not enough to preserve permissions and special modes - you need to use cp -r -p, or cp -a. _________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
 |
gouranga Tux's lil' helper

Joined: 05 Aug 2005 Posts: 113
|
Posted: Sun Dec 09, 2007 8:07 pm Post subject: |
|
|
Thx for pointing out what caused my problem. I should have read the man of cp.
Now it's to late.
My /usr/ partition is working back.
/etc/fstab wrote: | /mnt/hdb2/usr /usr none bind,umask=777 0 0 |
Maybe this is drastic , but for now I just want things to work.
X wasn't starting up for a normal user.
After a little search, I found out the sticky bit of /usr/bin/Xorg was missing.
Quote: | chmod +s /usr/bin/Xorg |
There is still a problem remaining.
I have no sound. Even as root , there is no sound.
I have tried several apps, but I get no sound.
Nothing is logged what could be wrong.
Anyone any thoughts?
update:
Quote: | By default sound is muted:
alsamixer--> pres m --> problem solved. |
|
|
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
|
|