Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3194  / 2 Years ago, sun, february 27, 2022, 4:59:39

I am using "UbuntuServer13.10" on my server and "Windows7-SP1" On my PC. Now I want to edit, add, delete, rename my files and folders in server using FTP. For this purpose, I installed "FileZilla 3.7.4.1 win32" in my PC and then try to connect my server though using it. I added my internal server IP(sftp://192.168.1.99) and my username(Ubuntu username not root) and password and added Port22. After this I was able to see my server files on FileZilla but not able to edit, add, delete, rename my files and folders in server using FileZilla.



When I try to add files then get "open for write: permission denied" and when try to delete file get "permission denied". Now my main question is that "How To Edit/Add/Delete/Rename Files/Folders In Ubuntu Server Using FileZilla?". Waiting for your reply...


More From » server

 Answers
1

Have you tried executing the command ls -l on the folder tou want to read/write on? The user you connect with might not have enough rights. This is usually the case when another user has created the files you want to access.



While ls -l lets you check who is the owner of the file/directory you want to access, to change permissions you can use chmod (more info here)



EDIT:
If you want to manage the access right to a specific folder for a single user, you will have to either:




  • Create the folder so that the user is the owner, and thus has all rights on it

  • Make sure the owner of the folder allowed the user to access it



To do that, you could for instance change the ownership of the folder and atribute it to the user. That way, you could manage access rights the way you want.
Juste type in sudo chown -R user /var/www/site1. This recursivelly (thanks to -R) attributes ownership to user.



For a bonus, you could chmod 500 /var/www/site1 so that no-one except user (and root, obviously) could read/write on the folder



NB:
The 5 used as an argument for chmod means you grant read & write permission. To grant read, write & execute permission, use 7. To grant none use 0.
The first number represent the permission for the owner, the second number represent the permission for the group, and the third represent the permission for the other users. Refer to the link provided if you need more info



NB2:
To check your ownership/permission on a file or a folder, type ls -l /my/folder, and you should get something like this :



 -rw-r--r-- 1 root root 65 Feb 11 15:08 index.html
| | |
permissions | |
owner group

[#26356] Tuesday, March 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whipstder

Total Points: 189
Total Questions: 110
Total Answers: 99

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
;