简体   繁体   中英

ubuntu server, php, ftp permissions

Ubuntu Server 14.04.1 w/ LAMP and Webmin/proFTP (haven't really used webmin much; too much stuff flying around)

Issue: With my user as owner of /var/www/ I can ftp files to the server, but PHP cannot handle files without www-data as the owner.

I also tried: sudo adduser myUsername www-data sudo chown -R www-data:www-data /var/www/

This still did not allow my user to FTP upload to this directory; changing it back to sudo chown -R myUsername:myUsername /var/www/ allows for FTP again.

How can I setup permissions to able to use FTP and have PHP be able to handle files (cURL, fopen, exec, etc.)?

I don't think this is the correct site to ask this question.

However try:

usermod -a -G www-data yourUserName

文件夹权限设置为755,并且应该已经为775(为组写)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM