ambiguities
Posts: 4
Joined: Sat Jan 19, 2013 4:09 am

Permission denied using SFTP

Sat Jan 19, 2013 5:58 am

I'm trying to transfer a file editor called nled from Seneca College into the /usr/bin folder so that i can use the editor instead of vi but whenever I try to transfer the filepart i get this error from WinSCP
Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 3
I understand the concept that I dont have permissions but I was wondering how I can go about adding resources to the /usr/bin. As I am relatively new to using and coding on the pi I'm sorry if this is an obvious fix. I tried to google the issue and came up with no solution. :?

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Permission denied using SFTP

Sat Jan 19, 2013 6:05 am

one option may work is to sftp it to the home directory of pi then ssh in and sudo mv nled /usr/bin/nled
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

ambiguities
Posts: 4
Joined: Sat Jan 19, 2013 4:09 am

Re: Permission denied using SFTP

Sat Jan 19, 2013 6:12 am

That worked perfectly thankyou! Now the only problem is when i call nled it tells me permission denied.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Permission denied using SFTP

Sat Jan 19, 2013 6:19 am

Finally found what I think you have http://cdot.senecac.on.ca/software/nled/ if that is it it isn't compiled for the Pi and possibly wouldn't work as it's for x86.

You could try to run it with sudo nled and see what it returns I would check to make sure it's executable though

You would possibly need to sudo chmod +x to make it executable.

Another very popular editor is vim

sudo apt-get install vim
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

ambiguities
Posts: 4
Joined: Sat Jan 19, 2013 4:09 am

Re: Permission denied using SFTP

Sat Jan 19, 2013 6:27 am

I really appreciate all the help.

I changed the permissions and it won't execute. I sent an email to the creator to see if it can be compiled for the pi.

Vim suits my needs perfect though thank you, I feel stupid forgetting about apt-get

User avatar
jojopi
Posts: 3274
Joined: Tue Oct 11, 2011 8:38 pm

Re: Permission denied using SFTP

Sat Jan 19, 2013 7:12 am

You should not really put a foreign executable into /usr/bin. A future package install or upgrade could clobber it with a similarly-named file. Better places to install to are /usr/local/bin for all users, or /home/pi/bin for user pi. This also makes it easier to back up your own files separately from the operating system, and to track your changes or retain them over a reinstall.

To compile nled yourself:

Code: Select all

sudo apt-get -y install ncurses-dev
wget http://cdot.senecac.on.ca/software/nled/nled_2_52_src.tgz
tar axf nled_2_52_src.tgz
cd nled-2.52
make
sudo install nled /usr/local/bin

Return to “Networking and servers”