Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am really new to ubuntu and I'm so confused, so please excuse my ignorance.

I have two drives on my computer an 80gig and 500gb. I have ubuntu installed on the 80gb drive but have all my media on the 500gb drive. I have changed the directory setting for my music and video files to look at the 500gb harddrive instead of the original default folder on the drive that ubuntu is installed on. However, when i tried to add files to my music and video folders on the larger drive I apparently do not have permission to do that or modify the folder in anyway at all since it is owned by the root.

I have tried a couple of suggestions posted in this forum but I can't seem to find anything that works and I keep getting operation not permitted. Can someone please provide me with a step by step idiot's guide to changing my permissions? I really need some help because I am completely lost. Maybe I have even set everything up incorrectly. I am willing to remount the drive or anything that's necessary (don't worry i have everything backed up on an external drive)...

Help please....

share|improve this question
add comment

3 Answers

you can change any folder to access by all with this command

If its a root directory , you have to deal with sudo .The below command modify that file or folder can be accessible by all .

sudo chmod 777 /path/to/file or folder

If you want to place it as you root and user have to access it but no other user have to means then

sudo chmod 770 /path/to/file or folder

Hope that helps.

Source

share|improve this answer
    
how would i know if it works. I tried this and nothing seemed to change. I really feel like I need to start over from scratch and just reinstall everything –  Terrence.S Sep 29 '12 at 4:13
    
Ok verify them with source link I have given . generally they have to work with what I gave you . –  raaz Sep 29 '12 at 4:27
    
I really don't understand what you want me to do? how do I verify them (the folders???)...I went to your source link and really don't know where to start...i tried a change ownership on my /media/music folderand got the response "operation not permitted" –  Terrence.S Sep 29 '12 at 4:47
1  
@August Those commands change permissions, not ownership. –  Eliah Kagan Sep 29 '12 at 5:12
add comment

I would be curious to see how you mounted the 500GB drive. Whenever I ran into this issue myself it would always be that I placed the incorrect permissions on the drive. While 777-ing the directory structure will work, it is not exactly the most secure way of solving the problem.

To try and the solve this problem I would take a closer look at how you mounted the drive. This might be a good guide: https://help.ubuntu.com/community/AutomaticallyMountPartitions#Systemwide_Mounts

share|improve this answer
    
is there anything you need from me...I'm so confused.. –  Terrence.S Sep 29 '12 at 4:13
1  
can you please post the contents of your /etc/fstab file? You can see it if you type less /etc/fstab in a terminal. –  eltommo Sep 29 '12 at 4:58
    
# <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda6 during installation UUID=045cabcf-fc7c-4fd2-b1e8-030fb069e3c0 / ext4 errors=remount-ro 0 1 /dev/sdb1 /media/500GB vfat uid=terry 0 1 –  Terrence.S Sep 29 '12 at 14:34
    
# /windows was on /dev/sda2 during installation UUID=F328-FCD2 /MainDrive vfat utf8,umask=007,gid=46 0 1 # swap was on /dev/sda5 during installation UUID=506d3665-b66b-468c-8b45-0680b317ea7e none swap sw 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0 –  Terrence.S Sep 29 '12 at 14:35
    
/dev/sdc1 /media/MainDrive vfat defaults 0 0 /dev/sde1 /media/sde1 vfat uid=terry 0 0 /dev/sdd1 /media/sdd1 ntfs defaults –  Terrence.S Sep 29 '12 at 14:35
show 2 more comments

To change ownership of your files and folders in your hard drive

sudo chown -Rv username /path-to-your-secong(500GB)-hdd

R stands for recursive & v to verbose the output

Here a simple tutorial about chown

< chown - change the owner of a file >

You can change the owner and group of a file or a directory with the chown command. Please, keep in mind you can do this only if you are the root user or the owner of the file.

Set the file's owner:

$ chown username somefile

After giving this command, the new owner of a file called somefile will be the user username. The file's group owner will not change. Instead of a user name, you can also give the user's numeric ID here if you want.

You can also set the file's group at the same time. If the user name is followed by a colon and a group name, the file's group will be changed as well.

$ chown username:usergroup somefile

After giving this command, somefile's new owner would be user username and the group usergroup.

You can set the owner of a directory exactly the same way you set the owner of a file:

$ chown username somedir

Note that after giving this command, only the owner of the directory will change. The owner of the files inside of the directory won't change.

In order to set the ownership of a directory and all the files in that directory, you'll need the -R option:

$ chown -R username somedir

Here, R stands for recursive because this command will recursively change the ownership of directories and their contents. After issuing this example command, the user username will be the owner of the directory somedir, as well as every file in that directory.

Tell what happens:

$ chown -v username somefile

Output is:

changed ownership of 'somefile' to username

Here, v stands for verbose. If you use the -v option, chown will list what it did (or didn't do) to the file.

The verbose mode is especially useful if you change the ownership of several files at once. For example, this could happen when you do it recursively:

$ sudo chown -Rv username somedir

Output is:

changed ownership of 'somedir/' to username

changed ownership of 'somedir/boringfile' to username

changed ownership of 'somedir/somefile' to username

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.