Jump to content


Setting permissions


  • Please log in to reply
8 replies to this topic

#1 OFFLINE   SueD

SueD

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,459 posts

Posted 01 February 2010 - 03:52 PM

I'd really like to change the permissions of sdb1, sdb5 and sdb6. Right now, they're set as root but it's a pita if I want to, say download an image into sdb5, I have to download somewhere I've got permission to first, change to root then move it. I've tried chown without success.Here's my fstab...

Quote

[sue@localhost ~]$ cat /etc/fstab# # /etc/fstab: static file system information## <file system>        <dir>         <type>    <options>          <dump> <pass>none                   /dev/pts      devpts    defaults            0      0none                   /dev/shm      tmpfs     defaults            0      0#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0#/dev/fd0               /media/fl   auto    user,noauto             0      0/dev/sda10 /home ext3 defaults 0 1/dev/sda5 swap swap defaults 0 0/dev/sda9 / ext3 defaults 0 1/dev/sdb1 /home/sue/Music   vfat   defaults   0 0/dev/sdb5 /home/sue/Images   vfat   defaults   0 0/dev/sdb6 /home/sue/Other   vfat   defaults   0 0
What do I have to do in order to change things?
Sue
Registered Linux User #433538
A life? Cool! Where can I download one of those?

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,146 posts

Posted 01 February 2010 - 04:23 PM

I know you said you tried chown but chmod may fix the issue:
# chmod -R xxx /home/sue/Music
and do this for the Images and Other folderI would either use 755 for -rwxr-xr-x (allows everyone to read/execute and only allows owner to write)  or use 777 for -rwxrwxrwx (full read/write/execute for all users).Also, you may want to look here:  http://www.zzee.com/...rmissions.shtml and here http://www.zzee.com/...hmod-help.shtmlBasically chown allows to change owner of files but chmod actually changes the permissions.
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#3 OFFLINE   SueD

SueD

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,459 posts

Posted 01 February 2010 - 04:59 PM

Thanks for the reads and I'll give that a try. :thumbsup:
Sue
Registered Linux User #433538
A life? Cool! Where can I download one of those?

#4 OFFLINE   SueD

SueD

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,459 posts

Posted 01 February 2010 - 05:13 PM

Nope, it didn't work. BTW, this is in Arch.I had the same issue in Mandriva then Bruno said that because it was FAT partition, there's no real ownership. However, in MDV, both Images and Other are set as sue:sue while Music remained root:root. I don't understand why the difference. :(Oh, and those reads? Pfffffft, way over my head.
Sue
Registered Linux User #433538
A life? Cool! Where can I download one of those?

#5 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 18,227 posts

Posted 01 February 2010 - 05:20 PM

You don't change permissions for a partition on a hard drive, Sue. You actually change permissions for the directory into which you mount the partitions. For a long time I used to mount my Archives partition in /media/vtel57_archives. It was a pain in the posterior till Bruno enlightened me. Now I mount all my storage and backup partitions right inside my /home/vtel57 directory. With the proper permissions set on the sub-directories and the proper fstab entries, it's no muss - no fuss from now on when trying to access them as regular user. :thumbsup:

Posted Image


#6 OFFLINE   SueD

SueD

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,459 posts

Posted 01 February 2010 - 05:26 PM

I'm not sure I'm understanding you Eric. I can access them, no problem. The issue is manipulation. I have to go through hoops to get images or music from /home to where I actually want them on sdb. AFAIK, they're already mounted.
Sue
Registered Linux User #433538
A life? Cool! Where can I download one of those?

#7 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 18,227 posts

Posted 01 February 2010 - 05:29 PM

Sue, With the partitions NOT mounted, change the mount sub-directories as so:
$ chown -R sue /home/sue/<mount sub-directories>$ chgrp -R users /home/sue/<mount sub-directories>$ chmod -R 744 /home/sue/<mount sub-directories>
sdb1, 5, and 6 are all FAT partitions, so make you fstab look like this:

Quote

/dev/sdb1 /home/sue/Music vfat defaults,gid=users,uid=sue 0 2/dev/sdb5 /home/sue/Images vfat defaults,gid=users,uid=sue 0 2/dev/sdb6 /home/sue/Other vfat defaults,gid=users,uid=sue 0 2
Remount your partitions now...
# mount /dev/sdb1mount /dev/sdb5mount /dev/sdb6
They should all allow "sue" user access without any problems. Users (group) and others can only Read, no w or x.Easy-peasy. Josh was headed in the right direction. You just needed a bit of extra info. Have fun! :thumbsup:

Posted Image


#8 OFFLINE   SueD

SueD

    Posting Prodigy

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,459 posts

Posted 01 February 2010 - 05:46 PM

Thanks Eric! I just tried it with Music and it worked. :)I'm off to do the others now.
Sue
Registered Linux User #433538
A life? Cool! Where can I download one of those?

#9 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 18,227 posts

Posted 01 February 2010 - 06:26 PM

Have FUN! :thumbsup:

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users