public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  [cifs] permissions of mounted share
@ 2009-01-11  7:07 Harry Putnam
  2009-01-11 14:13 ` Arttu V.
  0 siblings, 1 reply; 3+ messages in thread
From: Harry Putnam @ 2009-01-11  7:07 UTC (permalink / raw
  To: gentoo-user

Note this is a cross post here and debian.user.. the server is gentoo
the client is debian.

It's kind of a phony cross post though since I didn't think to do this
until I'd already posted on debian user... So its really a second post
with the same content.   Some consider that a phaux paux(?)... So
please forgive with my explanation.

Content:

I'm using samba and cifs to mount a certain directory on a linux
(gentoo) machine (Which will also be accessed by windows machines [but
not yet]).

On the server machine I've created the directory `projects'.  With
permissions 755 and ownership reader:wheel

This is mounted from a machine runnning debian lenny like this in
fstab:
(wrapped for mail at the `\')
(Note the host name is reader .. not to be confused with user reader)

 //reader/smProjects   /projects  cifs noauto,username=reader,\
 credentials=/etc/samba/CifsCredentials,uid=reader,gid=wheel

OK, with /projects share mounted on the deb machine, I attempt to copy
a directory (oneA) of files into it with `cp -a oneA /projects'

Note that the same user reader in group wheel exists on both server
and client machines.

The permissions on oneA (on client)  are 755 and the files inside are 644.

When I attempt to carry out the copy action I get a slew of warnings
like this:
  cp: setting permissions for `./oneA/...': Permission denied

The cp  is still carried out but all the files now have 744
permissions.

If I drop the -a[rchive] flag and do the cp with `cp -R' its done
silently but the permissions still end up 744 on what are regular files
(that were 644)

Any regular files I create on the mounted share end up 744.

Can I set a umask in the mount syntax or what do I need to do here to
have the files keep the standard permissions? Why are they being changed?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] [cifs] permissions of mounted share
  2009-01-11  7:07 [gentoo-user] [cifs] permissions of mounted share Harry Putnam
@ 2009-01-11 14:13 ` Arttu V.
  2009-01-11 16:12   ` [gentoo-user] " Harry Putnam
  0 siblings, 1 reply; 3+ messages in thread
From: Arttu V. @ 2009-01-11 14:13 UTC (permalink / raw
  To: gentoo-user

On 1/11/09, Harry Putnam <reader@newsguy.com> wrote:
> Any regular files I create on the mounted share end up 744.
>
> Can I set a umask in the mount syntax or what do I need to do here to
> have the files keep the standard permissions?

force create mode = 644
force directory mode = 755

Wouldn't that do it on the server so you wouldn't have to worry about
the clients? Or have you already tried and it still fudges the access
permissions?

-- 
Arttu V.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-user]  Re: [cifs] permissions of mounted share
  2009-01-11 14:13 ` Arttu V.
@ 2009-01-11 16:12   ` Harry Putnam
  0 siblings, 0 replies; 3+ messages in thread
From: Harry Putnam @ 2009-01-11 16:12 UTC (permalink / raw
  To: gentoo-user

"Arttu V." <arttuv69@gmail.com> writes:

> On 1/11/09, Harry Putnam <reader@newsguy.com> wrote:
>> Any regular files I create on the mounted share end up 744.
>>
>> Can I set a umask in the mount syntax or what do I need to do here to
>> have the files keep the standard permissions?
>
> force create mode = 644
> force directory mode = 755
>
> Wouldn't that do it on the server so you wouldn't have to worry about
> the clients? Or have you already tried and it still fudges the access
> permissions?

I didn't know about those parameters but looking them up in man
smb.conf it appears it would not effect anything done by the clients.
Far as I understand it the servers smb.conf doesn't come into play when
a client mounts a share.  

I've already set 644 and 755 on the existing files... by hand as
reported in OP.

But let me try it out before nay saying too much.

I added those params to smb.conf  then restarted samba.

Went to a client... mounted a share and attempted to copy a directory
into the share from clients file system..

Remember now that user and group are the same for both server and
client on these particular files.

The change in server smb.conf appears to have changed nothing.  Still
when I copy or create files they have 744 instead of 644 permissions.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-11 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11  7:07 [gentoo-user] [cifs] permissions of mounted share Harry Putnam
2009-01-11 14:13 ` Arttu V.
2009-01-11 16:12   ` [gentoo-user] " Harry Putnam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox