You are not logged in.

#1 2009-02-19 18:05:45

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Sharing a media folder between two users.

Hi.
There are 2 users on my computer, and we share mediafiles between us in the mounted partition "/media/kott"

The problem is;
(ie.) User A creates or copies a new directory called "coldplay", this is now owned by A. When B wants to add a new folder "vivalavida", B cannot do that because A owns this.

Previously i had media on a usb storage with ntfs, and this problem was non-existent.

Is there a way to mount this partition without any permissions at all?
How can i avoid this?

Offline

#2 2009-02-19 18:27:56

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Sharing a media folder between two users.

you can chmod the directories 777 and the files 666; this means rw (rwx for directories) access for owner, group, and all.  that poses a bit of a security risk though.

i'd have a cron job that changes group ownership on that folder (recursively) to "users"; then add users A and B to that group.  that way each owns what they create but both can edit whatever's there.

Offline

#3 2009-02-19 18:56:37

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Sharing a media folder between two users.

umask should help you here, you should be able to set it in fstab.

Offline

#4 2009-02-19 22:37:32

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: Sharing a media folder between two users.

What should i set it to?

I have this line now...

Found this site.
http://www.lockergnome.com/linux/2002/0 … sers-mask/
If i understood it correct i need something like umask=002.

So if i change this:
/dev/mapper/isw_dgghdjicdb_total8 /media/kott ext4 defaults 0 1

to this:
/dev/mapper/isw_dgghdjicdb_total8 /media/kott ext4 defaults umask=002 0 1

Would that be correct?

Offline

#5 2009-02-19 22:47:38

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: Sharing a media folder between two users.

Tried searching... Found this option "nosuid" wouldnt that be appropriate?

Offline

#6 2009-02-19 22:48:39

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Sharing a media folder between two users.

i _believe_ options should be comma separated:

/dev/whatever /media/whatever   ext4   defaults,umask=002   0 0

Offline

#7 2009-02-19 22:51:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Sharing a media folder between two users.

toffyrn wrote:

to this:
/dev/mapper/isw_dgghdjicdb_total8 /media/kott ext4 defaults umask=002 0 1

Would that be correct?

Don't forget the comma between 'defaults' and 'umask' smile

toffyrn wrote:

Tried searching... Found this option "nosuid" wouldnt that be appropriate?

No.

Offline

#8 2009-02-19 22:52:36

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Sharing a media folder between two users.

Take the "defaults" out. You only want that as filler if you have no other options, and in this case, you do have one.

Offline

#9 2009-02-20 01:06:25

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Sharing a media folder between two users.

ataraxia wrote:

Take the "defaults" out. You only want that as filler if you have no other options, and in this case, you do have one.

i think that's incorrect.  IIRC, by issuing defaults,umask=022 you mount the drive with all default options _and_ the umask bit

like my fstab has an entry with defaults,noauto b/c i want all the defaults used when mounted... except i don't want it mounted automatically (which is implicit with "defaults").  this was something i just recently picked up and it's very useful.

so i always use "...   ext3   defaults,[option(s) to override]   0 0"

EDIT: i stand corrected, ignore the above.

Last edited by brisbin33 (2009-02-20 02:43:16)

Offline

#10 2009-02-20 02:12:39

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Sharing a media folder between two users.

AFAIK, it works both ways. As ataracia said, defaults is always assumed (that's why they're defaults!), but if you have nothing else to put there, then you need to include it anyway to maintain the correct field count in fstab

Offline

#11 2009-02-20 02:42:45

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Sharing a media folder between two users.

hmm... go figure. thanks for the correction

Offline

Board footer

Powered by FluxBB