Changing ownership/Permission of Files/Folders in Linux

A common problem in using Linux is restriction. Some operations are restricted for users by root.But if it is needed to do that operation like editing what to do? Today I have faced same kind of problem. I use /var/www/ as localhost for server based development. I can’t get working jobs (already done) copied from another folder/device because of rescriction by addministrator. If I open that file as administrator ,it works. But It is impossible to open a large number of files by opening as administrator when in server based job like web development. So, I must make /var/www/ accessible for reading and writing for me.

To do this here is the command which must be executed on terminal.

sudo chown -R www-data:ujjal /var/www

// chown    -> change ownership
// www-data (owner name from)-> right click on the file and check permission tab for the owner name.
// ujjal   (owner name to be made)-> your username (check users and groups if you dont know your username)

or

sudo chmod 777 -R /var/www

Precautions: Linux is case sensitive.mind it.

Thanking you….

One Reply to “Changing ownership/Permission of Files/Folders in Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *