You are not logged in.
On a fresh install of Arch, I created a user with sudo permissions. The user's home directory is owned by root for some reason. (I am using this computer as a Minecraft server... trying to anyway).
ls -l /home/username
drwxr-xr-x 3 root root 4096 May 16 19:14 minecraftWhen I login as root, I cannot change the ownership of this directory to the user:
chown username /home/username
chown: changing ownership of '/home/username': Operation not permittedI've tried doing this as root and username (the only two users on the system) and neither can change the ownership of this directory. I cannot run the command to install Minecraft-server unless I have write permissions as the user, as I cannot do so as the root.
makepkg -si(from within the git download).
I have Arch running on several machines, this is the only one that set the ownership of /home/username to root. Why would it do this? How would I fix it?
Thanks!
Last edited by eric.meehan (2020-05-17 22:53:28)
Offline
What command was used to create the user username?
Offline
Also we've so far only seen the permissions of he minecraft directory nor the actual error when you try to change the owner as root (which *will* be required)
stat /home/username
grep username /etc/passwd
sudo chown username:username /home/username
mountOnline
Are you using systemd-homed? What's the output of `stat /home/username` and `findmnt /home/username`?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What command was used to create the user username?
During install I used
useradd -m -g users -G wheel usernameI also edited visudo to allow the group wheel to use sudo by uncommenting the line:
%wheel ALL=(ALL) ALLOffline
Are you using systemd-homed? What's the output of `stat /home/username` and `findmnt /home/username`?
stat /home/username
grep username /etc/passwd
sudo chown username:username /home/username
mount
I'm going to stop editing my username to "username" in the commands to give the output more precisely.
stat /home/eric
File: /home/eric
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 3 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-05-17 00:00:00.000000000 +0000
Modify: 2020-05-17 13:21:42.000000000 +0000
Change: 2020-05-17 13:13:44.500000000 +0000
Birth: -grep /etc/passwd
eric:x:1000:985::/home/eric:/bin/bashThis next one gave output indicating the command wasn't properly written, so I edited it. Original:
sudo chown eric:eric /home/eric
chown: invalid group: 'eric:eric'Edited:
sudo chown eric:users /home/eric
chown: changing ownership of '/home/eric': Operation not permitted
mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1729108k,nr_inodes=432277,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=11071)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /home type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=347496k,mode=700)findmnt /home/eric(returns nothing)
Thanks for the help!
Last edited by eric.meehan (2020-05-17 21:22:24)
Offline
Why is your /home formatted as FAT?
Offline
Why is your /home formatted as FAT?
It was not. I formatted the boot partition as FAT, but /home is a linux filesystem.
If you have a command I can use to double check this, I would appreciate it.
Offline
sudo file -s /dev/sda1Did you accidentally mount the boot partition at /home?
Online
jasonwryan wrote:Why is your /home formatted as FAT?
It was not. I formatted the boot partition as FAT, but /home is a linux filesystem.
Yes, it is. Look at the output of your mount command:
/dev/sda1 on /home type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '
Offline
sudo file -s /dev/sda1Did you accidentally mount the boot partition at /home?
Yes, it is. Look at the output of your mount command:
Well I'll be damned. Sorry about that, when I installed the os I mounted /dev/sda2 to /home like I did on my other installations (unless I made a typo during the procedure. The computer is old and has sticky keys). Why would that affect the permissions?
Offline
FAT does not have a concept of user / group ownership so the kernel assigns root by default.
Offline
FAT does not have a concept of user / group ownership so the kernel assigns root by default.
It seems I made a mistake during the installation. Thanks for the help!
Offline