![无法在目录中创建文件,即使我所属的组可以写入该文件](https://linux22.com/image/559163/%E6%97%A0%E6%B3%95%E5%9C%A8%E7%9B%AE%E5%BD%95%E4%B8%AD%E5%88%9B%E5%BB%BA%E6%96%87%E4%BB%B6%EF%BC%8C%E5%8D%B3%E4%BD%BF%E6%88%91%E6%89%80%E5%B1%9E%E7%9A%84%E7%BB%84%E5%8F%AF%E4%BB%A5%E5%86%99%E5%85%A5%E8%AF%A5%E6%96%87%E4%BB%B6.png)
我有一个目录结构,由某个组拥有,我是拥有这些目录的组的成员。我可以在一个目录中创建文件,但不能在另一个目录中创建文件,即使权限相同。
alan@bricky:/mnt/storage/media$ stat Music Music\ \(Lossy\)/
File: `Music'
Size: 34 Blocks: 8 IO Block: 4096 directory
Device: fb00h/64256d Inode: 4215424 Links: 3
Access: (2775/drwxrwsr-x) Uid: ( 1001/ media) Gid: ( 1001/ media)
Access: 2011-08-19 11:45:03.182586898 -0700
Modify: 2011-08-19 11:44:01.412840027 -0700
Change: 2011-08-19 11:45:02.734603240 -0700
File: `Music (Lossy)/'
Size: 6 Blocks: 8 IO Block: 4096 directory
Device: fb00h/64256d Inode: 1512056832 Links: 2
Access: (2775/drwxrwsr-x) Uid: ( 1001/ media) Gid: ( 1001/ media)
Access: 2011-08-19 11:45:03.190586606 -0700
Modify: 2011-08-19 10:34:46.526530313 -0700
Change: 2011-08-19 11:45:02.738603094 -0700
alan@bricky:/mnt/storage/media$ touch Music/test
alan@bricky:/mnt/storage/media$ touch Music\ \(Lossy\)/test
touch: cannot touch `Music (Lossy)/test': Permission denied
答案1
胡乱猜测:
Music/test
已经存在(具有允许成功的权限或类似权限touch
)。Music\ \(Lossy\)/test
不存在(或具有权限不要允许成功touch
)。- 您的用户不在该
media
组中(或者您自成为成员以来尚未调用登录 shell)。