Unable to add or delete file

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?

Regards
Peter

1 Like

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”.

James

1 Like

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.

Permission denied - Error code 3

2007-09-28 01:46

Just follow each step and you will get it fixed:

  1. Open WinSCP
  2. Bottom-left --> put a check on Advanced options
  3. Bottom of white window (Just above Advanced options) --> Left click on Preferences
  4. Now move to your right in line 2/3 of the way --> Left click on the Preferences “Radio-type” Button
  5. Now in the “Confirmations” box, 4th item from the top, Transfer resuming remove the ‘check-mark’
  6. Left-click on the OK Button -----> You’re done !

My only other thought is the nightmare of all security personnel. Go to the directory & type “chmod 777 *”

Good Luck!
LarryY

1 Like

Thanks. I’ll try the second solution, I see that option under “tools” on the bottom left side so I’ll see how it goes.

Update: it’s definitely the permissions in my case.

Which RACHEL version do you use? For Rachel+ 3.0 the username & password are not pi and rachel.

This is on RACHEL-Pi for me. It could be different on the RACHEL-Plus.

An update to this. I found the solution for the pi at least.

First select the site you’re connecting to and click edit

Step%201

Next change the file protocol to “SCP”

Step%202

Next click the advanced button

Step%203

Then select “SCP/Shell” on the left and on the right under the “Shell” drop down select Sudo Su

Step%204

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.