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