我有一些文件, nobody需要读取访问和apache需要读取和写入访问。 我应该怎么做 chown nobody.apache file chmod 460 file 要么 chown apache.nobody file chmod 640 file 或者也许别的东西?
我在我的Windows 2008R2文件服务器上有一个MP4文件,我希望人们能够查看,但不能创build副本。 是否有一个安全权限configuration,将允许这个?
我知道应该避免将文件/文件夹权限设置为777,而是使用更细化的方法。 我想知道,如果在web服务器上使用chmod 777有特殊情况是合理的。
我试图在我的linux服务器上的“/ opt / scm”下build立一个简单的存储库主机,但是当我以scm用户的身份尝试SSH时,出现这个错误。 Could not chdir to home directory /opt/scm: Permission denied 我以为我明白目录权限,但显然我做错了什么… 这就是我所做的。 cd /opt $ sudo mkdir scm $ sudo chown scm:scm scm/ $ sudo su scm $ chmod 660 scm/ $ ls -l drw-rw—- 2 scm scm 4096 Aug 28 10:03 scm 然后ssh在ssh [email protected]和我得到Could not chdir to home directory /opt/scm: Permission […]
我有一个PHP文件,这是试图读取和写入我的Ubuntu服务器上的XML文件,但问题是,它没有权限做到这一点(权限被拒绝的错误)。 我已经尝试了以下chown www-data read_write.php没有运气 什么是更改此文件的权限的正确方法? 更多信息 -rwxrwxr-x 1 www-data www-data 14092 Sep 6 12:33 read_write.php
在Debian上安装mysql服务器时出现问题。 (不是我的服务器,所以我不知道是什么造成了这个…) 安装添加数据库的新应用程序失败,并显示错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 我可以login用户,我刷新了权限… 然后,我可以通过这个问题: https : //stackoverflow.com/questions/1709078/how-can-i-restore-the-mysql-root-users-full-privileges 但是,当我试图停止MySQL,它失败 error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
我已经尝试了谷歌的四个页面中的前3页加上服务器故障的一切,没有任何工作,我得到的错误如下: [crit] [client] (13)Permission denied: /var/www/html/multicraft/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable 我已经尝试了/var/www/html/multicraft上的chmod 755 ,recursion但没有任何事情,没有运气。 请注意,我确实在服务器上安装了SELinux,但从未造成安装问题。 这里是/var/www/html输出, ls -l输出: total 8 -rw-r–r–. 1 root root 20 Aug 5 15:07 info.php drwxr-xr-x. 8 apache apache 4096 Aug 5 15:08 multicraft 并输出/var/www/html/multicraft : total 40 -rw-r–r–. 1 apache apache 560 Nov 9 2012 […]
在开发服务器(Ubuntu 14.04)上,我们在cron上每分钟运行一次这个shell脚本: for dir in /home/*; do username=$(basename $dir) echo "changing ownership to $username in $dir/public_html" chown -R $username:$username $dir/public_html chmod 755 $dir chmod -R 775 $dir/public_html done 其目的是将任何文件的所有权和chmod更改为虚拟主机的用户名。 这是因为当创build一个新文件时,它是由“root”创build的,因为我们的本地机器是使用root用户的SMB服务器。 这些文件需要由虚拟主机用户名拥有才能运行。 这个脚本工作得很好,但是当我们得到很多virutalhosts /文件的时候,服务器就会开始放慢速度,因为无论它是否需要它,它都会传播一切。 大多数时候它不需要它,因为它只是新的文件。 我的想法是将其更改为在public_html目录中查找任何不属于该虚拟主机用户名的文件,并仅显示该文件。 但是我担心不得不滚动浏览每个文件来知道哪些文件可能与当前的工作方式(只是查看目录级别然后recursion运行)一样(或更多)。 所以想知道有没有人有更好的想法呢? (满意sh或php脚本解决scheme) 目标:任何新创build的文件,chown和chmod它虚拟主机用户名和755.跳过所有其他文件。 不pipe怎样,也有能力跳过某些文件types。
我正在尝试使用CentOS 6和Apache启动一个networking服务器。 这些网站的文件被托pipe在Windows文件共享中。 这里是从fstab文件到安装网页文件的行: \\192.168.1.10\apache /var/www/html cifs credentials=/root/secret.txt,uid=apache,gid=apache 0 0 。 这似乎工作正常。 这是vhost.conf文件: Listen 80 <VirtualHost *:80> ServerAdmin [email protected] ServerName sub.domain.com DocumentRoot "/var/www/html/domain.com/sub/public_html" #ErrorLog /var/www/html/domain.com/sub/logs/error.log #CustomLog /var/www/html/domain.com/sub/logs/access.log combined </VirtualHost> 我运行命令ls -l /var/www/html/domain.com/sub/public_html ,这里是输出: total 1 -rwxr-xr-x. 0 apache apache 0 Jan 26 20:43 index2.txt -rwxr-xr-x. 0 apache apache 45 Jan 26 19:33 index.html 命令ls -l […]
有没有办法,创build这样的特权,这将允许只configuration一个特定的端口例如:gi1 / 0/1,但在那个时候不会让gi1 / 0/2configuration。 如下所示:特权界面gi1 / 0/1 10 UPD:如radius所示 ,从/ usr / local / share / doc / tac_plus / users_guide: The following configuration example permits user Fred to run the following commands: telnet 131.108.13.<any number> and telnet 128.<any number>.12.3 and show <anything> All other commands are denied (by default). user=fred { cmd = […]