Newby, need help with permissions, take control of media partition, access file/folder as admin

Newby, need help with permissions, take control of media partition, access file/folder as administrator.

I installed OpenSUSE 11.2 and partition my 80 GB HDD as follows during install:

/ (root) for system - 16 GB
/swap 4 GB
/home - 20 GB
/media/STORAGE - 34 GB for storing files musioc, photos, video, documents etc.

Now I cannot access the /media/STORAGE. Need help taking ownership (control) of this partition so I can read/write to it (save, cut, copy, paste, move to and from, delete files and folders).

Please help with step by step instructions and bear in mind that I am a newby, so you will need to explain everything in detail. Thanks.

Please open a terminal and post result of

cat /etc/fstab

This is a new install right?
I suggest reinstalling 11.3 (or 11.2 if you insist).


/ (root) for system - **18 GB**
**/swap 2 GB
/home - 54 GB - 54 GB for storing files musioc, photos, video, documents etc.**

/media/ is a special folder used by the system for mounting removable storage.

Then instead of installing /media/STORAGE,
you create /home/STORAGE after 11.3 finishes the installation.


su -
password: 
mkdir /home/STORAGE  
chown  userid:users  /home/STORAGE
chmod  -R --reference=/home/userid/
exit

I would not create /home/STORAGE, since /home is for the user folders, and ‘STORAGE’ is not a user. I’d rather create something like /data or, if your want, /STORAGE. This would mean you’d only have to change the mount point (which should definitely not be in /media) to /STORAGE. Then, after install, the next would be enough to make the partition accessible to all users:


chgrp users /STORAGE && chmod 775 /STORAGE

I endorse Knurpht’s advice.
You would run the command su first, to make your command have root authority. And if you already had files in the directory STORAGE, you would include the -R option/switch to change the files also, not just the container.

On the other hand, if you are the only user (i.e. if you wanted your username to own everything) you could use this command to make that happen:

chown -R  yourname:users /media/STORAGE && chmod 755 -R  /media/STORAGE

or

chown -R  yourname:users /STORAGE && chmod 755 -R  /STORAGE

depending on your preference

BTW, this might be worth reading: Notes on chown and chmod

Its up to the user to put /STORAGE (or /DATA) wherever he/she wants.
OTOH, /media/STORAGE was intended for storing files **music, photos, video, documents etc. **which belong on a separate partition from / (root) or in /home.

With 54Gb reallocated to /home there’s plenty of room for users.

Putting a /STORAGE on the / (root) would make it compete with /usr, /tmp and /var for space.

It doesn’t bother me if there’s a /home/STORAGE/MUSIC, /home/STORAGE/PHOTOS, or what it actually is /home/userid/STORAGE

Putting STORAGE under /home allocates 54Gb, simplifies OS version upgrades or changes vs. a /STORAGE on 18Gb / (root), frees the entire 18Gb / for /usr, /tmp, /var.
Trust me 34Gb is not a lot of storage for music, photos and videos.

Going by your standards, I would’ve recommended partitioning :
/ (root) for system - 18 GB
/swap 2 GB
/home - 20 GB
/STORAGE (or /DATA) - 34 GB for storing files music, photos, video, documents etc.

Also,


chmod -R userid:users /home/STORAGE  --reference=/home/userid

recursively changes the permissions of folder /home/STORAGE to be the same as /home/userid. I use this to ensure ACL changes are inherited from the reference file or folder.

Just ran a test and --reference=reference-file doesn’t do anything special for ACL.
But it still simplified setting folder permissions for me.

Even if the OP is still with us, I think this lot just went right over his head.

rotfl!rotfl! Yeah sorry!!

Sorry for the delay in answering this, but at first I was out of town, after which I forgot my password for this account. Now I’m back…

swerdna, thanks a lot.

The chown -R yourname:users /media/STORAGE && chmod 755 -R /media/STORAGE worked. I can now access my partition.

:slight_smile:

Sorry for the delay in answering this, but at first I was out of town, after which I forgot my password for this account. Now I’m back…

swerdna, thanks a lot.

The chown -R yourname:users /media/STORAGE && chmod 755 -R /media/STORAGE worked. I can now access my partition.

:slight_smile:

You’re very welcome. It’s great to see another happy Suser.