l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 7: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2009 Jan 22 11:26

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] CIFS sharing question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] CIFS sharing question



Ok, so I finally had some time to sit down this evening and try to
configure my NAS.

I've got a 'MUSIC' share which can be accessed by two users that I created
on the NAS using its web admin interface.

'guest' has read-only access.  'kendrick has read-write.


The way I've gone about it so far isn't working so well.
I created a user on my laptop, 'music'.
I created a '/shares/music' folder on my laptop, and
a credentials file with the password for the 'kendrick' user
I created on the NAS, and added the following to my laptop's
/etc/fstab:

//ns2300n/MUSIC /shares/music cifs auto,uid=music,gid=music,credentials=/etc/nas-credentials,file_mode=0777,dir_mode=0777,iocharset=utf8,rw 0 0

If I don't supply the "uid=", I'll end up with all of the
files appearing to be owned by the 2nd user I added to my
laptop (since I added the 'kendrick' user 2nd on the NAS).
I guess they're both uid 1001. :)

I can mount this with "sudo mount /shares/music".
I can even go in and create files and folders.
HOWEVER, I don't own them, and because the 'umask' of
the user on my laptop is set conservatively (0077),
I cannot actually access these files.

They appear on my laptop as owned by music:music
and rw[x]-----.

If I manually changed my umask first ('umask 0007'),
that helps.  Things come out rw[x]rw[x]---.
But since I guess I'm not in the 'music' group on
my laptop by default, I need to do a 'newgrp music'
before I can read/write the files.

So what do I want, precisely?

(1) User on the NAS named 'kendrick' who has R/W access
    to the MUSIC share.

(2) Ability to mount that share on my laptop, and
    actually read/write files without issuing any
    housekeeping commands (umask, newgrp, sacrifice --type=goat)
    beforehand.

(3) In fact, I only want the NAS mounts to appear if I'm
    on my home network (so that things don't timeout and
    fail when I boot up at Common Grounds, Mishka's,
    Crepeville, etc.)  Alternatively, the ability to
    mount as my local desktop user.

    NOTE: Every time I tried adding "user" to the fstab
    options, mount.cifs would warn that it's ignoring
    a blank username.  Damnit, I'm not saying "user"
    as in "user=USERNAME", I'm saying "user" as in
    "anybody can mount the corresponding system."
    Though I guess in that case, I really want to
    mount using the guest/guest read-only credentials.
    Woe is me.  What the heck do I want here, anyway?

Thanks in advance for any tips.

-- 
-bill!
"Tux Paint" - free children's drawing software for Windows / Mac OS X / Linux!
Download it today!  http://www.tuxpaint.org/
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.