SSH를 통해 서버에 연결하고 파일 권한을 변경해 보았습니다. 이것이 내가 얻는 것입니다:
$ ll
total 1
-rwx--x--x 1 <user> <groups> 17 Jul 29 12:06 index.html
$ chmod 777 index.html
$ echo $?
0
$ ll
total 1
-rwx--x--x 1 <user> <groups> 17 Jul 29 12:06 index.html
( ll
약어 ls -l
)
왜 작동하지 않나요?
결과 strace chmod 777 index.html
는 다음과 같습니다.
execve("/bin/chmod", ["chmod", "777", "index.html"], [/* 33 vars */]) = 0
brk(0) = 0xc3a000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0cf7687000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=83490, ...}) = 0
mmap(NULL, 83490, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0cf7672000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0
mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0cf70a2000
mprotect(0x7f0cf725d000, 2093056, PROT_NONE) = 0
mmap(0x7f0cf745c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7f0cf745c000
mmap(0x7f0cf7462000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0cf7462000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0cf7671000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0cf766f000
arch_prctl(ARCH_SET_FS, 0x7f0cf766f740) = 0
mprotect(0x7f0cf745c000, 16384, PROT_READ) = 0
mprotect(0x60c000, 4096, PROT_READ) = 0
mprotect(0x7f0cf7689000, 4096, PROT_READ) = 0
munmap(0x7f0cf7672000, 83490) = 0
brk(0) = 0xc3a000
brk(0xc5b000) = 0xc5b000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2919792, ...}) = 0
mmap(NULL, 2919792, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0cf6dd9000
close(3) = 0
umask(0) = 022
stat("index.html", {st_mode=S_IFREG|0711, st_size=17, ...}) = 0
fchmodat(AT_FDCWD, "index.html", 0777) = 0
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
답변1
POSIX 권한을 구현하지 않거나 권한 변경을 무시하도록 구성된 일종의 NAS 장치에서 파티션이 마운트되었음을 알 수 있습니다.
출력을 보면 로컬 파일 시스템이 아니라는 것을 알 수 있습니다.df -h index.html