I wanted to create modules but don’t have a privilege to do so. I use WinSCP to access the RACHEL web server with this username and password( pi and rachel). But when I tried to add modules or make changes, received this error message.
Is there any configuration I need to do or any username and password that have such privilege to make changes?
You will have to transfer to /var/tmp and then move the folder over ssh with putty due to permissions on /var/www/modules. The copy command would be “sudo cp -R modulename /var/www/modules/”. You will also probably have to set the ownership on that folder afterwards with “sudo chown -R www-data:www-data /var/www/modules/modulename”.
Seems like I got that message a year or so ago & all I had to do was upgrade to a more recent version of WinSCP. I could be mistaken though so it’s good that you have James’s solution.
LarryY
I tried upgrading WinSCP but had no luck. I also tried setting sudo su under edit->advanced->shell->sudo su but got the same error. If you have any other suggestions to try that’d be great because these extra steps slow things down quite a bit when I’m making changes to files.
I found 2 things on the Internet, but not sure if they’ll help.
First one just says to make sure you’re signing into the server as root, so probably a little too obvious to be much help.
Here’s the other thing I found on the WinSCP site, but frankly I have no faith in this solution. I’m guessing it’s for an older version of WinSCP as my version doesn’t have the option where he states it is. I found it under tools > preferences & frankly, I have “transfer resuming” checked, but I thought I would send you what I found just in case it does help.
An update to this. I found the solution for the pi at least.
First select the site you’re connecting to and click edit
Next change the file protocol to “SCP”
Next click the advanced button
Then select “SCP/Shell” on the left and on the right under the “Shell” drop down select Sudo Su
Click okay and then save. You should then be able to transfer files and folders directly to /var/www/modules on the RACHEL-Pi.
Keep in mind that you may still want to do “sudo chown -R www-data:www-data /var/www/modules” afterwards to make sure the files you transferred are owned by the www-data user.