{"id":455,"date":"2017-04-03T17:27:15","date_gmt":"2017-04-03T16:27:15","guid":{"rendered":"http:\/\/www.adienicholls.co.uk\/blog\/?p=455"},"modified":"2024-04-30T03:18:51","modified_gmt":"2024-04-30T02:18:51","slug":"raspberry-pi-ftp-www-folder-permission-issues","status":"publish","type":"post","link":"http:\/\/www.adienicholls.co.uk\/blog\/raspberry-pi-ftp-www-folder-permission-issues\/","title":{"rendered":"Raspberry Pi FTP WWW Folder Permission issues"},"content":{"rendered":"<p>After following guides to install my preferred web server for the Raspberry Pi, <a href=\"https:\/\/www.lighttpd.net\/\">Lighttpd<\/a>, I always seem to have a problem with permissions when modifying files in or under \/var\/www\/ folder.<\/p>\n<p>In the guides that have I have gone through you do go through adding the Pi user to the www-data folder and what not but you will still get Permission Denied error when trying to add\/remove\/modify\/create files when SFTP&#8217;ing in.<\/p>\n<p><!--more--><\/p>\n<p>I had found this and that from here and there, butchering 10 commands every time I hit the problem, i just wanted it to work, however.<\/p>\n<p>So I have come to install a new instance of Lighttpd on a test RPi, again I have hit the permission issues, cant find that bit of paper with my some what of a solution written down, a quick google&#8230;<\/p>\n<p>I was just going to start going through bookmarks to find these random commands that is whatever way get what I want done when I spotted this post I hadn&#8217;t seen before by <strong><a href=\"https:\/\/www.raspberrypi.org\/forums\/memberlist.php?mode=viewprofile&amp;u=29033\">pksato<\/a><\/strong> \u00bb Fri Jul 22, 2016\u00a0 over on the <a href=\"https:\/\/www.raspberrypi.org\/forums\" target=\"_blank\" rel=\"noopener\">raspberrypi.org\/forums. <\/a>This was exactly my issue and from what I understand this seems to resolve this issues i have been having in a short swift way.<\/p>\n<p><a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?t=155067&amp;p=1015166\" target=\"_blank\" rel=\"noopener\">Here is the link <\/a>to the original page, post 3;<\/p>\n<p>On normal situation, http daemon run as some user and group, www-data on debian (raspbian).<br \/>\nStandard html files are stored on \/var\/www\/, owned by root:root, with permissive permission, all can read, but only root can write.<br \/>\nTo ordinary user write to \/var\/www need to takeover it. Supposed the use is pi.<\/p>\n<p>sudo chown -R pi:www-data \/var\/www<br \/>\nAlso, need to set user and group permission:<br \/>\nsudo chmod u+rxw,g+rx-w,o-rwx \/var\/www<br \/>\nNow, \/var\/www can be read,write and chdir by user pi, group www-data can chdir and read. Other not have access.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After following guides to install my preferred web server for the Raspberry Pi, Lighttpd, I always seem to have a problem with permissions when modifying files in or under \/var\/www\/ folder. In the guides that have I have gone through you do go through adding the Pi user to the www-data folder and what not &hellip; <a href=\"http:\/\/www.adienicholls.co.uk\/blog\/raspberry-pi-ftp-www-folder-permission-issues\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raspberry Pi FTP WWW Folder Permission issues<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88],"tags":[262,260,257,261],"_links":{"self":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/455"}],"collection":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=455"}],"version-history":[{"count":2,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":481,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/455\/revisions\/481"}],"wp:attachment":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}