Results 1 to 6 of 6
Code:
jun@jun-laptop ~ $ ls -l /media
total 12
lrwxrwxrwx 1 root root 6 2010-08-09 06:24 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2010-08-09 06:24 cdrom0
drwxrwxrwx 1 root ...
- 08-31-2010 #1
Help to chmod my Storage
Code:jun@jun-laptop ~ $ ls -l /media total 12 lrwxrwxrwx 1 root root 6 2010-08-09 06:24 cdrom -> cdrom0 drwxr-xr-x 2 root root 4096 2010-08-09 06:24 cdrom0 drwxrwxrwx 1 root root 4096 2010-08-31 17:28 Storage drwxr-xr-x 6 root root 4096 2010-08-11 22:48 Storage (B) jun@jun-laptop ~ $
Hello!Code:jun@jun-laptop ~ $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 30G 26G 2.8G 91% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw varrun 1.5G 304K 1.5G 1% /var/run varlock 1.5G 0 1.5G 0% /var/lock udev 1.5G 172K 1.5G 1% /dev tmpfs 1.5G 472K 1.5G 1% /dev/shm lrm 1.5G 2.2M 1.5G 1% /lib/modules/2.6.28-19-generic/volatile /dev/sda5 81G 20G 62G 25% /media/Storage /dev/sda6 72G 21G 48G 30% /media/Storage (B) jun@jun-laptop ~ $

I created a "guest" user in my Mint and I don't like them to access my "Storage" & "Storage (B)".
May I please ask how to do it using chmod. I tried to play around with it but it still automatically mounts in guest user environment.
Thank you!nujinini
Linux User #489667
- 08-31-2010 #2
Methinks you should set owner in fstab. man fstab and man mount will help.
- 08-31-2010 #3
What is the filesystem of Storage and Storage B partitions?
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 08-31-2010 #4
As segfault suggested, provide fstab with the necessary information such that it mounts your stuff with a valid guid that matches a group that should be able to read/write stuff on that storage. Then set chmod o-rwx and nobody other than the specified group will be able to access it.
All this can be done with:
* addgrp
* chmod
* /etc/fstab
Happy bashing.
- 08-31-2010 #5
Thank you all!
"Storage" is ntfs
"Storage (B)" is ext4
Yes, fstab also passed my mind. However, I also wanted to hear some other ideas if there are still other ways aside from editing fstab in the "guest" account.
nujinini
Linux User #489667
- 08-31-2010 #6
Oh, yes .. and the users that should access that stuff must be added to the group.
check if user already has group:
id user
add user to group:
usermod -a -G group user
finally check if everything is as it should:
id user


Reply With Quote