7

I am a novice linux/Ubuntu user who is just discovering the joys of a lightweight, free software environment which gives control to the user.

To protect some of my data (photos) from the rigours of OS crashes/reinstallation etc. I have created a small storage partition on my primary hard disk using gparted at /dev/sda3 using the ext4 filesystem.

On startup the partition auto-mounts to /media/chris/photo storage. I can see the drive at this location, and in the Unity launcher.

The only problem is I have no permissions to use the 'drive' and hence cannot copy files into it, add folders or in fact do anything in the storage area. My question is how to I give myself permissions within my normal Ubuntu account to use it?

Best Regards,

Chris

3 Answers 3

6

I found the the solution:

sudo chown -R chris /media/chris/Photo_Storage

(note - i had to change the partition name to make it work in terminal).

...or, more generally:

sudo chown -R myname.myname /media/data/

For those that don't know, sudo gives you root access on the next command. chown gives folder ownership to the named account.

2
  • Sorry, the correct generalisation of the command is: sudo chown -R user:group file Jun 16, 2013 at 10:41
  • You can edit your answers (and questions) to correct or add something. Oct 15, 2014 at 13:37
0

Try this. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo chmod u+w /media/chris/photo storage
2
  • No joy, unfortunately. If I go to 'properties' it still says "you are not the owner, so you cannot change these permissions." Jun 16, 2013 at 10:27
  • Type sudo -i, and change the permissions, and see.
    – Mitch
    Jun 16, 2013 at 10:50
0

The best way to go is through your terminal. The first answer should work fine for you. All in all, being new to Linux, you need to understand file system hierarchy and how all works. Most things won't be achieved using the GUI, the power of Linux is inside the CLI. I had same issues once upon a time. Note what works for you.

If you are doing something and not working out, use your sudo. It is like a command from a president.

sudo chmod works for some and chown works too, then make your file be executable by user. You need to read up on that too. I will advice you watch Joe Collins on YouTube.

$ sudo chmod 777 name_of_partition

I love numbers for execution, you can use letters too like +x.

Your partition is in a file(folder) called media, that is where all drives are stored, USB and so on.

1
  • To make directories or files world-writable is usually not a good idea.
    – mook765
    May 7, 2020 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .