changing directory permissions

Discussion and Technical Support for general software applications and utilities including OS related issues.
Post Reply
mike
Member
Member
Posts: 15
Joined: August 28th, 2011, 9:08 am

changing directory permissions

Post by mike »

Hi

I've just added a new 2TB drive that I will use to store films etc. I have successfully formatted and mounted the drive as /media (the media directory now indicates that it is 1.7TB in size), however permissions are set to 'root' and I as a user cannot create new folders etc to migrate my data to.

I know that changing the permissions relates to the chmod command, but I cannot seem to be able to change the permissions. I have tried the likes of

chmod a+r+w media - failed
also tried this as sudo which seemed to execute, but didn't change the permissions

I did have a smaller drive set up correctly (i.e. could add/delete files), but changed to the larger drive and now cannot for the life of me remember how I changed the permissions. Can some kind soul point me in the right direction?

thanks in advance

Mike
Sergeus
Member
Member
Posts: 24
Joined: September 30th, 2011, 12:46 pm

Re: changing directory permissions

Post by Sergeus »

I believe, and someone should fact-check me on this because I'm not very experienced with Linux file permissions, but you should be able to do this:

sudo chown -R yourusername:yourusername /media

Put in your sudo password if prompted, and then your username should be the owner and you can change everything. The -R is there in case there are already any folders/files on the drive, so it will change the permissions of those too. I hope. Ian or Andy will be able to answer this better than I can.
mike
Member
Member
Posts: 15
Joined: August 28th, 2011, 9:08 am

Re: changing directory permissions

Post by mike »

thanks, worked a charm

mike
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: changing directory permissions

Post by Ian »

Sergeus wrote:I believe, and someone should fact-check me on this because I'm not very experienced with Linux file permissions, but you should be able to do this:

sudo chown -R yourusername:yourusername /media

Put in your sudo password if prompted, and then your username should be the owner and you can change everything. The -R is there in case there are already any folders/files on the drive, so it will change the permissions of those too. I hope. Ian or Andy will be able to answer this better than I can.
Nout wrong with that advice sir. Spot on! :clap:
Post Reply