除了我的 /home 目录之外,无法在任何地方创建文件夹和文件

除了我的 /home 目录之外,无法在任何地方创建文件夹和文件

我将 Debian 测试与 KDE 5 一起使用。除了我的/home/semko目录之外,我无法创建文件或文件夹。 (用户“semko”是我 - 我的电脑的唯一用户。我想访问我的所有驱动器)

/home/semkodir 上,当我右键单击并看到以下属性时:

在此输入图像描述

然而,在我的其他驱动器上,我看到了这一点:

在此输入图像描述

我以为这与 有关fstab。所以我更改了我的默认 fstab(由 Debian 安装生成):

$ cat /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/sda6 during installation
UUID=e65325bf-88c0-4b4b-9aa2-aea07ef659de /       ext4   
errors=remount-ro 0   1
# /boot/efi was on /dev/sda2 during installation
UUID=B8F3-B50F  /boot/efi   vfat    umask=0077  0   1
# swap was on /dev/sda5 during installation
UUID=22bd59d4-b4c9-4509-b6dc-00faf700f23c none        swap    sw       
      0       0

对此:

 cat /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/sda6 during installation
UUID=e65325bf-88c0-4b4b-9aa2-aea07ef659de /               ext4   noatime,defaults,discard  0    0
# /boot/efi was on /dev/sda2 during installation
UUID=B8F3-B50F  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda5 during installation
UUID=22bd59d4-b4c9-4509-b6dc-00faf700f23c none            swap    sw              0       0
# mount wdP1
UUID=2bf4cc1c-7e84-4e34-adb9-0d2fbf5ed1a7 /media/mnt/wdP1mnt ext4 noatime,defaults,discard  0    0
# mount hitaP1
UUID=70686D3664DCF58D /media/mnt/hitaP1mnt ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0
# mount wdP2
UUID=127724642DFFF971 /media/mnt/wdP2mnt ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0
# mount win10
UUID=FC9816989816518E /media/mnt/win10mnt ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0

这些是我的驱动器(sda固态硬盘sdbsdc是 HDD):

$ lsblk -f
NAME   FSTYPE LABEL    UUID                                 MOUNTPOINT
sda                                                         
├─sda1 ntfs   Recovery FC42F32142F2DF78                     
├─sda2 vfat            B8F3-B50F                            /boot/efi
├─sda3                                                      
├─sda4 ntfs            FC9816989816518E                     /media/mnt/win10mnt
├─sda5 swap            22bd59d4-b4c9-4509-b6dc-00faf700f23c [SWAP]
└─sda6 ext4   debDwell e65325bf-88c0-4b4b-9aa2-aea07ef659de /
sdb                                                         
├─sdb1 vfat   EFIWD    4C26-549A                            
├─sdb2 ext4   wdP1     2bf4cc1c-7e84-4e34-adb9-0d2fbf5ed1a7 /media/mnt/wdP1mnt
└─sdb3 ntfs   wdP2     127724642DFFF971                     /media/mnt/wdP2mnt
sdc                                                         
├─sdc1 vfat   EFI      F392-8011                            
└─sdc2 ntfs   hitaP1   70686D3664DCF58D                     /media/mnt/hitaP1mnt

答案1

简单的 Linux 权限。用户semko拥有其$HOME目录。 Linux 系统上的大多数其他目录都由root某个其他系统相关帐户拥有,并且只能由这些帐户或这些帐户写入root

也许你想要的是:

# chgrp semko /media/mnt/*
# chmod g+w /media/mnt/*

我个人更喜欢使用组所有权而不是用户所有权。

相关内容