0

I am not able to change permission on a directory I created on the Unix server.

This is how the structure looks

$ ls
engany  N832342  N854431  zabbix
$ 

Now I want to change the permission in N854431 folder so that I can read, write and execute files there.

Reason being currently when I am trying to scp some file from my local to that folder it gives an error "Permission Denied"

When I do this:

$ ls -l 
total 16
drwxr-xr-x  3 engany  engany  4096 Jan 16 08:46 engany
drwxr-xr-x  3 N832342 N832342 4096 Jan 15 05:30 N832342
drwxr-xr-x  5 N854431 N854431 4096 Jan 16 09:25 N854431
drwxr-xr-x 16 zabbix  zabbix  4096 Jan 10 22:51 zabbix
$ 

I want rwx permission for any directory under N854431.

So I did this:

$ chmod -R ugo+rwx /home/N854431 And now I see rwx permission in N854431

$ ls -l
total 44
-rwxrwxrwx 1 N854431 N854431  8980 Apr 20  2016 examples.desktop
-rwxrwxrwx 1 N854431 N854431 24971 Jan 16 10:14 file.py
drwxrwxrwx 4 N854431 N854431  4096 Jan 16 10:08 web_path
$ 

However now when I try to send a file from my local to a directory under N854431

$ scp file.py N854431@10.6.121.124:/web_path

gives "Permission Denied" error.

When I do just the directory

$ scp file.py N854431@10.6.121.124:

It is able to send file.py under N854431. But it is not sending it to any other directory under N854431.

What is going wrong

  • 3
    You probably want ~/web_path, not /web_path – jordanm Jan 16 at 20:32
  • when i do this: ssh N854431@10.6.121.124 it logs me to /home/N854431/. Thats why it also sends the file.py to this folder as mentioned last – Baktaawar Jan 16 at 20:33
  • 1
    When you start a path with /, that makes it absolute, not relative to your starting location. – jordanm Jan 16 at 20:33
  • Isn't N854431@10.6.121.124: before takes u to /home/10.6.121.124? – Baktaawar Jan 16 at 20:37
  • Do u also know how can I remove write permission for Others now? I added ugo. I want rwx permission in all directories under N854431 – Baktaawar Jan 16 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.