标签: permission-denied

/tmp 中符号链接的权限

我的机器上有 2 个用户:linuxliteotheruser.

otheruser 有一个文件:

otheruser@linuxlite:~$ ls -l a
-rw-rw-r-- 1 otheruser otheruser 6 Mar 31 12:47 a
otheruser@linuxlite:~$ cat a
hello
Run Code Online (Sandbox Code Playgroud)

linuxlite制作了一个文件和一个符号链接/tmp

otheruser@linuxlite:~$ ls -l /tmp/file /tmp/link
-rw-rw-r-- 1 linuxlite linuxlite  3 Mar 31 12:49 /tmp/file
lrwxrwxrwx 1 linuxlite linuxlite 17 Mar 31 12:49 /tmp/link -> /home/otheruser/a
Run Code Online (Sandbox Code Playgroud)

现在,虽然otheruser可以阅读/tmp/file/home/otheruser/a,但他无法阅读/tmp/link

otheruser@linuxlite:~$ cat /tmp/file
hi
otheruser@linuxlite:~$ cat /home/otheruser/a
hello
otheruser@linuxlite:~$ cat /tmp/link
cat: /tmp/link: Permission denied
Run Code Online (Sandbox Code Playgroud)

我的问题是, …

permissions symlink tmp permission-denied

8
推荐指数
1
解决办法
592
查看次数

尝试“mv”目录时权限被拒绝

情况:

  • 我正在将Bash 与适用于 Windows 的Linux 子系统(10)一起使用;我以root身份登录。
  • 我当前目录中的所有文件夹和文件都有rwxrwxrwx,后代文件和文件夹也是如此。
  • 我的当前目录和后代目录中都没有系统文件。
  • 没有文件夹与git同步。

问题:

  • 我无法更改一个特定目录的名称。但是,我可以为每个其他目录或文件执行此操作 - 无论是在当前目录中,还是在相关的无法mv使用的目录中。

我可以将整个目录复制到另一个目录,然后自由更改其名称,或者我可以将其内容复制到具有所需名称的文件夹中,这些解决方案是可以接受的,但使用起来mv会更容易。对于知识的缘故-作为一个bashLinux的新手-我真的想了解的问题。


根据要求提供其他信息

root@MARVIN:/mnt/h/testing# mv test1.pl otherName
mv:无法将“test1.pl”移动到“otherName”:权限被拒绝
root@MARVIN:/mnt/h/testing# lsattr test1.pl
lsattr:在读取 test1.pl/css 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/fonts 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/index.html 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/index2.html 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/index3.html 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/index4.html 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/index5.html 上的标志时,设备的 ioctl 不合适
lsattr:在读取 test1.pl/js 上的标志时,设备的 ioctl …

mv windows-subsystem-for-linux permission-denied

7
推荐指数
1
解决办法
2万
查看次数

无法 cd 到 .ssh

将新的 ssh 密钥添加到 .ssh/authorized_hosts 后,我无法在不输入密码的情况下 ssh 到机器。

更有趣的是,当我通过 ssh 登录(没有直接控制台访问)时,.ssh 目录突然无法访问:

pi@prodpi ~ $ ls -la
drw-------   2 pi   pi      4096 Mar 13  2015 .ssh

pi@prodpi ~ $ cd .ssh/
-bash: cd: .ssh/: Permission denied

pi@prodpi ~ $ ls .ssh/
ls: cannot access .ssh/authorized_keys: Permission denied
ls: cannot access .ssh/known_hosts: Permission denied
authorized_keys  known_hosts

pi@prodpi ~ $ sudo ls .ssh/
authorized_keys  known_hosts
Run Code Online (Sandbox Code Playgroud)

用户是pi。什么 - 如果不是目录权限 - 会阻止我以所有者身份访问该文件夹并可能导致 ssh 登录?

ssh cd-command permission-denied

3
推荐指数
1
解决办法
5341
查看次数

为 root 和用户安装具有写入权限的 Windows 共享

在 debian 上,我对 root 有写权限,但对用户没有。我还没有在 smb.conf 中做任何更改,所以它是默认的。存在用户的读取权限。如何为用户添加写权限?

gameboy@debian:~$ sudo mount.cifs //MOC/php /home/gameboy/Pulpit/Windows-Share -o user=wat
Password for wat@//MOC/php:  ************* 
gameboy@debian:~$ touch /home/gameboy/Pulpit/Windows-Share/test2
touch: cannot touch ‘/home/gameboy/Pulpit/Windows-Share/test2’: Permission denied
gameboy@debian:~$ sudo -u root touch /home/gameboy/Pulpit/Windows-Share/test2
gameboy@debian:~$ ls -l /home/gameboy/Pulpit/Windows-Share/test2
-rwxr-xr-x 1 root root 0 Apr 26 21:23 /home/gameboy/Pulpit/Windows-Share/test2
gameboy@debian:~$ 
Run Code Online (Sandbox Code Playgroud)

remote windows mount cifs permission-denied

3
推荐指数
1
解决办法
2万
查看次数