Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chown not working [closed]

On Ubuntu 12.04, the chown command doesn't seem to be working like it should

root@server:/var/www/folder/# ls -al

Running this puts out

drwxr-xr-x 11 776 sftponly 4096 Feb 17 14:08 Other_Folder

I need write permissions for the group, so I run:

chown -R 776 ./Other_Folder

Then when I run ls -al again, the output is still

drwxr-xr-x 11 776 sftponly 4096 Feb 17 14:08 Other_Folder

like image 464
Corbz Avatar asked Feb 19 '13 19:02

Corbz


People also ask

Can Chown be used to change permissions on files?

This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago. Show activity on this post. chown is used to change ownership of the file, not change permissions.

What is the difference between ls-al and Chown?

Update the question so it's on-topic for Stack Overflow. Closed 6 years ago. Show activity on this post. chown is used to change ownership of the file, not change permissions. ls -al is not showing you who owns the file, just its permissions.

How to Chown the contents of the volume after it is mounted?

If you want to chown the contents of the volume after it is mounted, you should place those instructions on a script that is called as the CMD. Show activity on this post.


1 Answers

chown is used to change ownership of the file, not change permissions.

ls -al is not showing you who owns the file, just its permissions.

If root owns those files, you'll need to chown them properly, before you can change their permissions:

chown -R yourname:yourname folderName

Then as the owner you can change their permissions:

chmod -R 776 folderName

Edit: I double checked the syntax and it seems to be right, you'll likely need to use sudo to use them.

like image 61
Nick Pickering Avatar answered Oct 08 '22 15:10

Nick Pickering