linux 使用nginx 权限不够,对于nginx和Linux,有一些关于权限的问题。
I've recently moved to Digital Ocean after using shared hosting for years!
我最近才搬到数字海洋,用了多年的共享主机!
I'm loving the freedom to install and change anything I want, but I'm unclear about some things.
我喜欢安装和改变任何我想要的东西的自由,但是我不清楚一些事情。
I'm using the LEMP stack installed on Ubuntu 12.04.4x64. I've followed This tutorial here to create a separate account "Archer" so I won't have to use the root account all the time.
我正在使用安装在Ubuntu 12.04 4x64上的LEMP栈。我在这里按照本教程创建了一个单独的帐户“Archer”,因此我不必一直使用根帐户。
Even though Archer has admin permissions I still couldn't edit files in the server using SFTP. SSH works, but not SFTP. So I made Archer owner of the folders I wanted to edit. In nginx.conf I changed the user from "www-data" to "Archer"
尽管Archer具有管理权限,我仍然不能使用SFTP编辑服务器中的文件。SSH能够工作,但不能使用SFTP。所以我让Archer的所有者,我想编辑的文件夹。nginx。conf我将用户从“www-data”更改为“Archer”
Now I have a few PHP scripts that save images in my server. They don't have permission to save those images anymore. Cronjobs aren't working either.
现在我有一些PHP脚本可以在服务器中保存图像。他们没有权限保存这些图像。计划不奏效。
I am thinking they are all related and I messed up on something basic. I'd appreciate any and all help in the right direction!
我认为它们都是相关的,我搞砸了一些基本的东西。我希望能在正确的方向上得到任何和所有的帮助!
1 个解决方案
#1
3
I'd suspect a problem with changing the folders/files owner from "www-data" to "Archer", since that seems to be when the problems started. Try changing the owner back to "www-data" and see if that fixes the PHP scripts permissions problems.
我怀疑将文件夹/文件所有者从“www-data”更改为“Archer”的问题,因为这似乎是问题开始的时候。尝试将所有者更改为“www-data”,看看这是否修复了PHP脚本权限问题。
THEN, if the new user Archer can't edit some files, I'd add the Archer user to a group that has permission to edit the files, use a command like usermod -a -G groupName userName (recommended here https://stackoverflow.com/a/7283086/3412074 or you could edit /etc/groups directly )
然后,如果新用户Archer不能编辑某些文件,我将Archer用户添加到具有编辑文件权限的组中,使用usermod -a -G group name命令(建议使用https://stackoverflow.com/a/7283086/3412074或者直接编辑/etc/groups)
Adding Archer to the "www-data" group should work (it seems to be a standard group on Ubuntu-based things)
向“www-data”组添加Archer应该是可行的(它似乎是基于ubuntu的标准组)
sudo usermod -a -G www-data Archer
sudo usermod -a -G www-data Archer
linux 使用nginx 权限不够,对于nginx和Linux,有一些关于权限的问题。相关推荐
- 在linux系统下安装两个nginx以及启动、停止、重起
如果没有安装过nginx请看:linux下nginx部署以及配置详解 1.第一个nginx已经安装完成后,现在安装第二个nginx 启动:sudo /usr/sbin/nginx3 重起:sudo / ...
- Linux守护进程的创建(结合nginx框架)
Linux守护进程的创建(结合nginx框架) 先介绍几个相关函数: int dup2(arg1,arg2):参数一指向的内容赋给参数二,shi的参数二也能访问参数一所指向的内容,并返回新的描述符 i ...
- linux系统nginx启动不了,nginx启动不了,求大神帮助!
服务器挂了,折腾半天Nginx都起不来,不知道咋回事,本人小白用户,求大神帮帮忙! # nginx -t nginx: the configuration file /usr/local/nginx/ ...
- linux slf4j.rpm,Centos下安装nginx rpm包
1 在nginx官方网站下载一个rpm包,下载地址是:http://nginx.org/en/download.html wget http://nginx.org/packages/centos/6 ...
- Linux深入篇之一:配置Nginx Web服务器及多域名主机
Linux深入篇之一:配置Nginx Web服务器及多域名主机 一.Nginx简介 nginx [engine x]是Igor Sysoev编写的一个HTTP和反向代理服务器,另外它也可以作为邮件代理 ...
- [Linux实用工具]Linux监控工具munin的展示(Nginx)
Munin的安装和配置可以参考第一篇文章: [Linux实用工具]Linux监控工具munin的安装和配置 http://www.cnblogs.com/rond/p/3757804.html Mun ...
- Linux 下Nginx+Tomcat 完美整合 nginx tomcat 整合方式
Linux 下Nginx+Tomcat 完美整合 nginx tomcat 整合方式 随着IT行业的不断发展,个人.企业应用对网站的性能也不断的提高,从以前的apache+tomcat整合.weblo ...
- FastDFS - Linux下搭建FastDFS 文件服务器与Nginx配置(部署和运维)
朋友做了个视频在线App,线上运维我来帮他折腾.此篇记录部署步骤,方便下次直接查看使用.部分内容来源于网络,如侵联删. 本篇文章只叙述FastDFS的部署与运维,简介请点击FastDFS - 快速的分 ...
- Nginx入门篇-基础知识与linux下安装操作
我们要深刻理解学习NG的原理与安装方法,要切合实际结合业务需求,应用场景进行灵活使用. 一.Nginx知识简述 Nginx是一个高性能的HTTP服务器和反向代理服务器,也是一个 IMAP/POP3/S ...
- Nginx 五大常见应用场景,Linux运维请收藏~
Nginx 是一个很强大的高性能 Web 和反向代理服务,它具有很多非常优越的特性,在连接高并发的情况下,Nginx 是 Apache 服务不错的替代品.其特点是占有内存少,并发能力强,事实上 ngi ...
最新文章
- 基于数据融合的城市点云自动标注
- 如何在Windows Azure VM上的SQL Server和Windows Azure SQL Database两者中做出选择
- 面向对象编程基础 (一)
- 【Luogu】P1896互不侵犯King(状压DP)
- 【Vegas原创】Mysql绿色版安装方法
- Python | 如何使用pip升级所有Python软件包?
- CSS: 解决100% 高度失效 height 100% is not working when scrolling down page
- 使用ob_gzhandler函数有3种方法让它对php进行压缩
- Asp.net页面传值
- vue中Component错误
- CentOS7安装JDK完整步骤
- 京瓷打印机m5521cdn_京瓷ECOSYS M5521cdn打印机驱动下载
- 使用中国电信物联网开发者平台的步骤总结
- OFFPIPE 海底管道铺设计算分析软件
- Python项目实战:爬取糗事百科最热门的内涵搞笑段子
- 永久性删除的文件怎么恢复,怎么还原文件
- 年月日、年积日、简化儒略日、GPS周之间相互转换(C++)
- 创蓝253短信平台代码实现
- 如何招聘:永远不要自负的人
- MATLAB轻松绘制地图路线——已知及未知坐标下的处理方法(1)
热门文章
- SAP 产品线中写法很接近,容易混淆的几个名称
- SAP Hybris Commerce Cloud Accelerator Storefront 在 Eclipse 中的调试
- SAP Commerce Cloud 启动和重启脚本
- 如何给基于 SAP Cloud SDK 的应用增添缓存支持 Cache support
- SAP Cloud for Customer的前世今生
- 使用Angular HTTP client对数据模型进行删除操作
- Visual Studio Code里关于ESLint的错误消息
- how is crmd_product_i inserted to db
- Application log debug - storage
- IBASE component valid to field