能否贴上 /home/oracle/20131108.zip 这个文件的权限详情?
使用命令:
ls -l /home/oracle/20131108.zip一般权限不够,使用chmod修改权限,可以试试 chmod 777 /home/oracle/20131108.zip,然后再mv,当然还得看你登录的用户属于哪个群组了。
你是直接移动 /tmp ,还是 /tmp 里面的某个文件?按你的思路,应该说整个 Linux 系统只有 root 可以写数据,别人都没权限。因为 / 目录是 root:root ,的 rwxrwxrwx 。
每个文件都有自己的权限的,我要没记错,移动、复制要进行递归检测权限的。反正 cp 是需要递归进入目录对每个文件和目录进行读取(这个时候就会检测权限)后才能复制的。mv 命令可能仅限于你要移动的某个参数提供的具体文件/目录名。
--------------------
貌似权限系统很复杂很复杂杂杂杂……
jiangtao@localhost /aaaa $ sudo ls `sudo find` -ld
drwxr-xr-x 4 root root 4096 Mar 13 21:44 .
drwxrwxrwx 2 root root 4096 Mar 13 21:45 ./1
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a/b
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a/b/c
drwxrwxrwx 3 root root 4096 Mar 13 21:41 ./a/b/c/d
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a/b/c/d/e
drwx------ 2 root root 4096 Mar 13 21:45 ./a/b/c/d/e/f
-rwxr-xr-x 1 root root0 Mar 13 21:42 ./a/b/c/d/e/f/g
jiangtao@localhost /aaaa $ mv a/b/c/d/e/f/g 1/
mv: cannot stat `a/b/c/d/e/f/g': Permission denied
jiangtao@localhost /aaaa $ mv a/b/c/d/e/f 1/
mv: cannot move `a/b/c/d/e/f' to `1/f': Permission denied
jiangtao@localhost /aaaa $ mv a/b/c/d/e 1/
mv: cannot move `a/b/c/d/e' to `1/e': Permission denied
jiangtao@localhost /aaaa $ mv a/b/c/d 1/
mv: cannot move `a/b/c/d' to `1/d': Permission denied
jiangtao@localhost /aaaa $ mv a/b/c 1/
mv: cannot move `a/b/c' to `1/c': Permission denied
jiangtao@localhost /aaaa $ mv a/b 1/
mv: cannot move `a/b' to `1/b': Permission denied
jiangtao@localhost /aaaa $ mv a 1/
mv: cannot move `a' to `1/a': Permission denied
jiangtao@localhost /aaaa $ sudo chmod 0777 a/b/c/d -R
jiangtao@localhost /aaaa $ mv a/b/c/d/e/f/g 1/
jiangtao@localhost /aaaa $ mv a/b/c/d 1/
mv: cannot move `a/b/c/d' to `1/d': Permission denied
jiangtao@localhost /aaaa $ mv a/b/c/d/e 1/
jiangtao@localhost /aaaa $ mv a/b/c/d 1/
mv: cannot move `a/b/c/d' to `1/d': Permission denied
jiangtao@localhost /aaaa $ sudo ls `sudo find` -ld
drwxr-xr-x 4 root root 4096 Mar 13 21:44 .
drwxrwxrwx 3 root root 4096 Mar 13 21:47 ./1
drwxrwxrwx 3 root root 4096 Mar 13 21:41 ./1/e
drwxrwxrwx 2 root root 4096 Mar 13 21:46 ./1/e/f
-rwxrwxrwx 1 root root0 Mar 13 21:42 ./1/g
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a/b
drwxr-xr-x 3 root root 4096 Mar 13 21:41 ./a/b/c
drwxrwxrwx 2 root root 4096 Mar 13 21:47 ./a/b/c/d
jiangtao@localhost /aaaa $
Linux新装系统后一般要求用户创建一个用户名,创建后一般为标准用户或管理员用户,但无论如何,有些文件必须通过root权限打开。所以把普通用户的文件移动到管理员必须要进行身份可读权限的设置,才能进行。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)