You are not logged in.
Pages: 1
So, I recently installed Arch on a Xen server with /home being on a separate partition. Ever since I created my user account (and added it to the wheel, power, storage, and users groups), then installed yay for AUR packages, I've suffered very strange permission errors where files will have all their permissions stripped away except for read by owner. Therefore I have to use sudo rm all over the place and I've no idea why. I'm using BTRFS as my file system for both partitions (both root and /home) but I don't think that would affect things all that much. I've tried using setfacl to alter the permissions; this is what all of it looks like at the moment:
# file: home/ethin
# owner: ethin
# group: users
# flags: -s-
user::rwx
group::---
other::---
default:user::rwx
default:group::---
default:other::---(I've just altered my fstab to mount /home with NODEV and NOSUID mount options.... I'm not sure what else to try or what's going wrong. This is a base install of arch with no major modifications to anything.)
Offline
Probably irrelevant but why did you add your user to power and storage?
https://wiki.archlinux.org/index.php/Us … emd_groups
Offline
Its just something I picked up when I first learned to install arch... I just never really stopped doing it since.
Offline
files will have all their permissions stripped away except for read by owner
When? On creation, later, after specific events?
Some or all files, specific directories or mount points?
Umask?
Offline
When? On creation, later, after specific events?
I honestly don't know. It only seems to happen when I install the xe-guest-utilities-git/xenstore-git packages (the build fails but still). The problem is that the PKGBUILD isn't broken from what I can tell.
Some or all files, specific directories or mount points?
It only seems to happen on ~ ($HOME) from what I can tell, so only under the /home mount point. It doesn't seem to happen anywhere else.
Umask
077
Offline
What is the output of the following, when logged in as your user:
touch ~/atestfile
stat ~/atestfile
rm ~/atestfileOffline
touch ~/atestfile: No output
stat ~/atestfile:
File: /home/ethin/atestfile
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 35h/53d Inode: 214919 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ ethin) Gid: ( 985/ users)
Access: 2021-03-13 11:49:40.309991305 -0600
Modify: 2021-03-13 11:49:40.309991305 -0600
Change: 2021-03-13 11:49:40.309991305 -0600
Birth: 2021-03-13 11:49:40.309991305 -0600rm ~/atestfile: No output
Offline
See if it is the same for /home and / .
stat /home
stat /Offline
For /home, I get:
File: /home
Size: 10 Blocks: 32 IO Block: 4096 directory
Device: 35h/53d Inode: 256 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-03-11 22:15:11.633327688 -0600
Modify: 2021-03-11 22:13:44.716661045 -0600
Change: 2021-03-11 22:13:44.716661045 -0600
Birth: 2021-03-11 11:06:57.000000000 -0600And for / I get:
File: /
Size: 122 Blocks: 32 IO Block: 4096 directory
Device: 19h/25d Inode: 256 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-03-12 15:02:34.323324875 -0600
Modify: 2021-03-11 11:27:07.429995510 -0600
Change: 2021-03-11 11:27:07.429995510 -0600
Birth: 2021-03-11 11:06:54.000000000 -0600Offline
/home and / look fine, so what if you create a new user:
# useradd -m testuser
# password testuserLogout as your user login as the new user and rerun the commands from post #6.
Offline
The output is similar to that of the original output:
File: /home/testuser/atestfile
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 35h/53d Inode: 214924 Links: 1
Access: (0600/-rw-------) Uid: ( 1001/testuser) Gid: ( 1001/testuser)
Access: 2021-03-13 13:21:55.996657470 -0600
Modify: 2021-03-13 13:21:55.996657470 -0600
Change: 2021-03-13 13:21:55.996657470 -0600
Birth: 2021-03-13 13:21:55.996657470 -0600Offline
His umask is 077 (very bottom of post #5), the behavior is expectable.
https://wiki.archlinux.org/index.php/Umask
Sorry, missed that
stripped away except for read by owner. Therefore I have to use sudo rm all over the place
We've not seen that, but the inability to delete files does not so much depend on their permissions as on the permissionto write the directory they're in.
So please post those stats.
Edit: "states" …
Essentially
mkdir foo
stat test
touch foo/bar
stat foo/barand stat foo and foo/bar again when you lose the ability to delete bar.
Last edited by seth (2021-03-13 21:45:17)
Offline
Given the newly created user also has the same umask something in /etc/profile or another global config file is setting it to 077?
Offline
See my edit, the umask explains the outputs of #7 ff. but not the problem described in the OP ![]()
Offline
If umask were 377, it would be an explanation., but as it as 077 we can eliminate that idea.
Please post the stats of the parent directory next time you see the effect.
Offline
I'll do that if it happens again.
Offline
Ideally create a baseline first (see post #12) and also look out for a pattern (resp. try to trigger it as you suggested in #5)
Offline
Okay, I've managed to trigger it again:
:: Checking for conflicts... :: Checking for inner conflicts... [Aur:2] xe-guest-utilities-git-20190927.2f5d2e4-1 (xe-guest-utilities-git xenstore-git) 1 xe-guest-utilities-git (xe-guest-utilities-git xenstore-git) (Build Files Exist) ==> Packages to cleanBuild? ==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4) ==> a :: Deleting (1/1): /home/ethin/.cache/yay/xe-guest-utilities-git unlinkat /home/ethin/.cache/yay/xe-guest-utilities-git/src/xe-guest-utilities/pkg/mod/golang.org/x/sys@v0.0.0-20210313202042-bd2e13477e9c/.gitattributes: permission denied error cloning xe-guest-utilities-git: fatal: destination path 'xe-guest-utilities-git' already exists and is not an empty directory.
Output of
getfaclon the file:
# file: home/ethin/.cache/yay/xe-guest-utilities-git/src/xe-guest-utilities/pkg/mod/golang.org/x/sys@v0.0.0-20210313202042-bd2e13477e9c/.gitattributes
# owner: ethin
# group: users
user::r--
group::---
other::---Output of stat on the parent directory of ~:
File: /home
Size: 26 Blocks: 32 IO Block: 4096 directory
Device: 32h/50d Inode: 256 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-03-14 12:01:28.326666665 -0500
Modify: 2021-03-13 13:20:18.129990836 -0600
Change: 2021-03-13 13:20:18.129990836 -0600
Birth: 2021-03-11 11:06:57.000000000 -0600Stat of a test file:
File: test
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 32h/50d Inode: 216078 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ ethin) Gid: ( 985/ users)
Access: 2021-03-14 12:15:05.149999983 -0500
Modify: 2021-03-14 12:15:05.149999983 -0500
Change: 2021-03-14 12:15:05.149999983 -0500
Birth: 2021-03-14 12:15:05.149999983 -0500Stat of ~/.cache/yay:
File: .cache/yay
Size: 76 Blocks: 0 IO Block: 4096 directory
Device: 32h/50d Inode: 214914 Links: 1
Access: (2700/drwx--S---) Uid: ( 1000/ ethin) Gid: ( 985/ users)
Access: 2021-03-12 18:29:02.423333210 -0600
Modify: 2021-03-14 12:10:41.153333320 -0500
Change: 2021-03-14 12:10:41.153333320 -0500
Birth: 2021-03-12 18:29:02.423333210 -0600The odd thing is the S bit (is that SUID or Sticky?). I'm mounting /home with NODEV and NOSUID.
Edit: I can successfully reproduce this issue by creating a separate user account and attempting the same command (
yay -S xe-guest-utilities-git xenstore-git) from there.
Last edited by ethin (2021-03-14 17:22:10)
Offline
What are the stats along the path from /home/ethin/.cache/yay down to /home/ethin/.cache/yay/xe-guest-utilities-git/src/xe-guest-utilities/pkg/mod/golang.org/x/sys@v0.0.0-20210313202042-bd2e13477e9c?
Offline
Pages: 1