Questions tagged «permissions»

“文件系统权限”的缩写-基于用户,组或全局访问的访问控制。


5
Plex不会输入我的主目录或其他分区
我刚刚从Ubuntu软件中心安装了Plex媒体服务器,并打开了Web界面。我想先添加一个集合。当它给我一个文件浏览器时,我想转到/home/robin/Videos。/home就我所知。它显示为robin,前面带有一个箭头,但是当我尝试扩展目录树时,它为空。尝试访问时发生了同样的情况/media/Data。对我来说,这样的用处不大,因为我所有的媒体文件都在这两个目录中。 帮助将不胜感激。 我的第一个猜测似乎是正确的。与往常一样,这是一个权限问题。如何在不授予其他用户访问权限的情况下授予对我的主文件夹的plex访问权限?我的主文件夹是经过加密的,因此可能会使事情复杂一些。 robin@RobinJ:~$ sudo -u plex bash [sudo] password for robin: bash: /home/robin/.bashrc: Permission denied plex@RobinJ:~$ ls -al ls: cannot open directory .: Permission denied plex@RobinJ:~$ cd /home plex@RobinJ:/home$ cd robin bash: cd: robin: Permission denied plex@RobinJ:/home$ ls -al robin ls: cannot open directory robin: Permission denied


2
在没有sudo的情况下运行apt-get
这可能是一个非常幼稚的问题,但是我想知道如何在不使他们成为root用户的情况下,使多个用户访问一台计算机。我将如何给予他们有限的sudo访问权限,以便他们仍然可以发出类似的命令 sudo apt-get install epstopdf 我想这可能是一个非常愚蠢的问题,因为一旦授予root用户访问权限,他们就可以做他们想做的任何事情。因此,有什么解决办法吗?我愿意提出建议

2
AWStats:无法访问/var/log/apache2/access.log
我在新的Ubuntu Lucid服务器上安装了awstats,但是当cron尝试以用户身份运行它时www-data,它会抱怨cannot access /var/log/apache2/access.log: Permission denied。 在/usr/share/doc/awstats/README.Debian此段落中: 默认情况下,Apache使用uid = root和gid = adm存储(从1.3.22-1版本开始)的日志文件,因此您需要... 1)更改/etc/logrotate.d/apache中的日志文件的权限,以使www-data至少具有读取权限。 2)与1)相同,但更改为特定用户,然后使用Apache的suEXEC功能以同一用户身份运行(并同时更改/ var / lib / awstats的权限或使用其他目录)。这更加复杂,但是服务器通常无法访问日志(这可能是Apache默认设置的要点)。 3)将awstats.pl更改为adm组(但是请注意,然后冒着允许CGI脚本访问计算机上管理员内容的风险!)。 我会选择1,但是建议授予什么权限?


2
为什么不能以任何方式修改快照文件?
我已经尝试了很长时间来更改Blender的图标,但是无论我做什么,都不允许在中编辑任何内容/snap/blender-tpaw/3/。 这是我尝试过的: 从编辑的文件nautilus没有sudo。 nautilus使用sudo(sudo nautilus在终端中)编辑文件。 使用终端命令,例如cp或rm不使用sudo。 结合使用终端命令sudo(例如sudo cp <source> /snap/blender-tpaw/3/或sudo rm /snap/blender-tpaw/3/<filename.ext>) 在root终端中执行上述所有操作(使用sudo -i) 在每种情况下,我都会收到以下错误: cannot remove/copy '/snap/blender-tpaw/3/filename.ext': Read-only file system 其中filename是文件,.ext是其扩展名。 这也适用于其他快照的文件,不仅适用于Blender。 我在这里做错什么了吗?还是不可能更改这些文件?尽管我认为这是不可能的,因为从Ubuntu到Blender的所有内容都是开源的,所以他们没有理由阻止我们修改这些文件。 编辑: 我使用主菜单(alacarte)来更改图标,但是我仍然想知道为什么我不能修改任何快照文件。

2
更改监禁SFTP的写入权限会拒绝登录
我在许多网站和论坛上搜寻了如何使用CHROOT设置被监禁到某个目录的SFTP用户。这是我遵循的步骤,但似乎无法获得写许可权才能工作。 设定 sshd_config #Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp internal-sftp Match group webmaster X11Forwarding no ChrootDirectory %h AllowTcpForwarding no ForceCommand internal-sftp 创建文件夹 mkdir /var/www/sites 创建用户和组 useradd uploader passwd uploader usermod -d /var/www/sites uploader groupadd webmaster uploader groupadd www-data uploader 权限和所有权 chown root:root /var/www chmod 755 /var/www/sites 现在,有了这些设置,用户上载程序便可以通过SFTP进入主目录,但无法写入该目录。 发生2种典型错误,我无法登录或没有写权限。 登录错误 Error: Network …


2
在运行rsync时强制设置权限
目前,我正在使用rsync / ssh组合脚本从实时服务器向备份服务器备份千兆字节和几千兆字节的数据,从而允许每天晚上执行cron作业时自动进行操作。 我遇到的问题是权限。 使用-a模式运行rsync会复制user:group和filemode,它们当前为54122:games和-rwx--S ---。 为了能够在备份服务器上执行文件(不要问我为什么雇主要求这样做),我不得不花费大量时间和CPU成本(因为传输的数据量很大) ()和chmod()将每个文件/文件夹设置为www-data:www-data,权限为755。 无论如何,我可以设置rsync强制将每个文件/文件夹设置为www-data:www-data和755还是从错误的角度看这个问题? 我猜我可以运行-rltD而不是-a(等效于-rlptgoD),但是新文件会怎样?他们会收到什么权限和所有者:组设置?


3
如何从以Snap安装的应用程序访问USB存储?
我已经安装了Ubuntu 18.04 LTS。 我将USB闪存插入笔记本电脑。它已自动安装到/ media / username / DISKLABEL并在Nautilus中打开。我可以读写对象。 如何从作为Snap安装的应用程序访问它? 我尝试了以下应用程序如按扣gedit,arduino-mhall119,organize-my-files。如果我导航到/ media文件夹,所有这些都向我显示错误: 活动的Snap 接口的输出如下: $ snap interfaces | grep -v ".*-$" Slot Plug :browser-support organize-my-files :core-support core:core-support-plug :cups-control gedit :desktop gedit,organize-my-files :desktop-legacy gedit,organize-my-files :gsettings gedit,organize-my-files :home arduino-mhall119,gedit,organize-my-files :network arduino-mhall119,gedit,organize-my-files,pulsemixer :opengl organize-my-files :pulseaudio organize-my-files,pulsemixer :unity7 arduino-mhall119,gedit,organize-my-files :wayland gedit :x11 arduino-mhall119,organize-my-files,pulsemixer gnome-3-26-1604:gnome-3-26-1604 …

2
为什么find命令在/ run /中爆炸?
我使用以下命令来检查此答案给出的python版本。除了一个错误,它确实可以工作,如下所示。谁能解释为什么? $ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; \ | awk -F: '/x-executable; charset=binary/ {print $1}' \ | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V' 错误: find: ‘/run/user/1000/gvfs’: Permission denied
13 permissions  find 

2
Ubuntu的OSX`chmod -h`标志是什么?
在OSX中,我可以设置符号链接本身的权限(而不是它指向使用-h的东西)。从手册页: -h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to. 在Ubuntu 14.04中,我尝试设置符号链接的权限,但这仅在符号链接目标上设置。 它与从/home/nagios/.ssh/someprivatekey到的符号链接有关/somewhere/else/privatekey,因此权限对于ssh很重要。我该如何实现?

2
tcpdump权限问题
运行tcpdump时遇到问题。我必须以非root用户身份运行tcpdump。在网络上搜索我的问题,并发现我应该: sudo setcap cap_net_admin=eip /usr/sbin/tcpdump 这使我能够与用户一起运行tcpdump,但随后得到: you don't have permission to capture on that device 在我尝试捕获的任何设备上。 还进行了一些蛮力操作并执行了以下操作: sudo chmod +s /usr/sbin/tcpdump 那也没有做到。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.