在 20.04 上重启后,chown 操作不会持久

在 20.04 上重启后,chown 操作不会持久

最近我遇到了一个问题,我必须使用 tty 将我的主目录的权限更改回我的主要用户,并且每次启动时都会发生这种情况。我不知道是什么原因导致这种情况不持久。我该如何彻底解决这个问题,并在将来避免这种烦人的解决方法?

tty中的操作顺序:

使用 UN 和 PW 登录

sudo su

(now acting as root user)

cd home/seumas/

chown seumas .

(exit tty and log in graphically)

/etc/fstab 内容

# /etc/fstab: static file system information.

# Use 'blkid' to print the universally unique identifier for a device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=435410b9-b4b3-4bcb-b300-8967be32612d /               ext4    noatime,errors=remount-ro 0       1

# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=441E-E722  /boot/efi       vfat    umask=0077      0       1

# /home was on /dev/sda4 during installation
UUID=1b60b312-8481-4338-bab3-ba8a572ff3e0 /home           ext4    noatime,defaults        0       2

# swap was on /dev/sda3 during installation
UUID=f3e2d240-3a9c-4e0d-8a08-77704641c8a3 none            swap    sw              0       0

输出ls -alFd

drwx--x--- 106 seumas root 12288 Nov 23 15:13 ./

输出/etc/passwd

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:100:102:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nologin
systemd-resolve:x:101:103:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin
syslog:x:102:106::/home/syslog:/usr/sbin/nologin
messagebus:x:103:107::/nonexistent:/usr/sbin/nologin
_apt:x:104:65534::/nonexistent:/usr/sbin/nologin
uuidd:x:105:111::/run/uuidd:/usr/sbin/nologin
avahi-autoipd:x:106:112:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/usr/sbin/nologin
usbmux:x:107:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
dnsmasq:x:108:65534:dnsmasq,,,:/var/lib/misc:/usr/sbin/nologin
rtkit:x:109:114:RealtimeKit,,,:/proc:/usr/sbin/nologin
cups-pk-helper:x:110:116:user for cups-pk-helper service,,,:/home/cups-pk-helper:/usr/sbin/nologin
speech-dispatcher:x:111:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/false
whoopsie:x:112:117::/nonexistent:/bin/false
kernoops:x:113:65534:Kernel Oops Tracking Daemon,,,:/:/usr/sbin/nologin
saned:x:114:119::/var/lib/saned:/usr/sbin/nologin
pulse:x:115:120:PulseAudio daemon,,,:/var/run/pulse:/usr/sbin/nologin
avahi:x:116:122:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/usr/sbin/nologin
colord:x:117:123:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
hplip:x:118:7:HPLIP system user,,,:/var/run/hplip:/bin/false
geoclue:x:119:124::/var/lib/geoclue:/usr/sbin/nologin
gnome-initial-setup:x:120:65534::/run/gnome-initial-setup/:/bin/false
seumas:x:1000:1000:seumas,,,:/home/seumas:/bin/bash
postfix:x:122:127::/var/spool/postfix:/usr/sbin/nologin
nm-openvpn:x:124:132:NetworkManager OpenVPN,,,:/var/lib/openvpn/chroot:/usr/sbin/nologin
lightdm:x:125:133:Light Display Manager:/var/lib/lightdm:/bin/false
systemd-timesync:x:126:135:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
tss:x:127:136:TPM software stack,,,:/var/lib/tpm:/bin/false
tcpdump:x:128:138::/nonexistent:/usr/sbin/nologin
_flatpak:x:129:139:Flatpak system-wide installation helper,,,:/nonexistent:/usr/sbin/nologin
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
debian-tor:x:130:140::/var/lib/tor:/bin/false
postgres:x:131:141:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
test:x:1001:1001:,,,:/home/test:/bin/bash
gdm:x:121:125:Gnome Display Manager:/var/lib/gdm3:/bin/false

相关内容