View previous topic :: View next topic |
Author |
Message |
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Sat Nov 17, 2012 4:49 pm Post subject: weird permission problem with a stage4 install[SOLVED] |
|
|
Hello,
I'm running into a weird permission problems after chroot'ing into a stage4 install
Code: | sysresccd ~ # sudo
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sysresccd ~ # ls -ld /etc/ /etc/sudoers
drwxr-xr-x 1 root root 2088 Nov 17 14:47 /etc/
-r--r----- 1 root root 2849 Sep 25 14:40 /etc/sudoers
sysresccd ~ # ls -l $(which sudo)
---s--x--x 2 root root 108496 Sep 25 14:40 /usr/bin/sudo |
qn other one:
Code: | sysresccd ~ # id truc
uid=1000(truc) gid=1000(truc) groups=1000(truc),18(audio),19(cdrom),27(video),85(usb)
sysresccd ~ # su - truc
Unable to cd to '/home/truc'
sysresccd ~ # ls -ld /home /home/truc
drwxr-xr-x 1 root root 16 Sep 25 22:59 /home
drwxr-xr-x 1 truc truc 130 Nov 11 19:07 /home/truc |
I did a bit of research and it actually looks like the same problem as detailed on this stackexchange question.
The thing is that I was also trying to play with btrfs, this may or may not be the root of the problem(*), I have some time at hands and I would like to understand what's going on, so if you have any idea on how to debug this further that would be great!
(*) -> on the same btrfs 'storage pool'(?), but on a different subvolume, I've made a quick debian installation (with debootstrap) and I have *not* run into similar problems
Here are some additionnal informations:
Code: | /dev/sda3 on /mnt/gentoo type btrfs (rw,noatime,nodiratime,subvol=@g_root,compress=lzo,ssd_spread,discard)
/dev/sda3 on /mnt/gentoo/var/log type btrfs (rw,noatime,nodiratime,subvol=@g_vlog,compress=lzo,ssd_spread,discard)
/dev/sda3 on /mnt/gentoo/home type btrfs (rw,noatime,nodiratime,subvol=@home,compress=lzo,ssd_spread,discard)
/proc on /mnt/gentoo/proc type none (rw,bind)
/dev on /mnt/gentoo/dev type none (rw,bind)
/sys on /mnt/gentoo/sys type none (rw,bind)
|
I'm running a sysrescue liveusb, kernel&btrfs tools version:
Code: | root@sysresccd /mnt % uname -a
Linux sysresccd 3.2.33-std311-amd64 #2 SMP Wed Oct 31 07:31:30 UTC 2012 x86_64 Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz GenuineIntel GNU/Linux |
Code: | btrfs --version
Btrfs Btrfs v0.19 |
Thanks in advance! _________________ The End of the Internet! |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Wed Nov 21, 2012 10:45 am Post subject: |
|
|
eh! this was stupid of me! I had checked permissions on /etc and /home but not on the root itself:
Code: | drwx------ 1 root root 156 Nov 13 23:25 / |
Which was obviously missing some Read&Execute bits. (a simple chmod go+rx / fixed the problem!).
This was in some way related to btrfs which for some reasons seems to ignore your umask and set new subvolume permissions to 700 by default.
/me feels stupid , anyway _________________ The End of the Internet!
Last edited by truc on Thu Nov 22, 2012 11:56 am; edited 2 times in total |
|
Back to top |
|
|
mcsurui n00b
Joined: 22 Nov 2012 Posts: 1
|
Posted: Thu Nov 22, 2012 6:29 am Post subject: mcsurui |
|
|
The problem I have had, I can't solve. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Nov 22, 2012 12:05 pm Post subject: Re: mcsurui |
|
|
mcsurui wrote: | The problem I have had, I can't solve. |
I am not sure you're having the same problem since I just gave the solution in my post above and it looks like that wasn't enough for you.
You might want to start a new thread explaining exactly what your problem really is. _________________ The End of the Internet! |
|
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
|
|