FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-14-2010, 03:31 PM
Tom H
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

On Tue, Sep 14, 2010 at 8:06 AM, Andy Graybeal
<andy.graybeal@casanueva.com> wrote:
> This is a repeat question, I'm going to rephrase it a little and maybe
> I'll get a response this time around.
>
> I'm using Ubuntu 10.04, metacity and nautilus, and linux terminal server
> (LTSP).
>
> My umask is set to 002 in my /etc/X11/Xsession.d.
> The filesystem has ACL's enabled.
> I have the folder set with setgid +s.
>
> The ACL's look like this:
> andy.graybeal@buddleia:/srv/Desktop/Tech$ getfacl .
> # file: .
> # owner: root
> # group: tech
> # flags: -s-
> user::rwx
> group::rwx
> other::r-x
> default:user::rwx
> default:group::rwx
> default:mask::rwx
> defaultther::r-x
>
> andy.graybeal@buddleia:/srv/Desktop/Tech$
>
> Why when I copy a file from a jump/flash drive, does it not inherit the
> ACL's properly?
> Here is an example of a file I copied from a jump drive:
>
> andy.graybeal@buddleia:/srv/Desktop/Tech$ ls -lah cabling.txt
> -rwx------+ 1 andy.graybeal tech 2.8K 2010-07-28 20:40 cabling.txt
> andy.graybeal@buddleia:/srv/Desktop/Tech$

Is "/etc/X11/Xsession.d" the right place for your umask?!

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-14-2010, 03:46 PM
Andy Graybeal
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

>
> Is "/etc/X11/Xsession.d" the right place for your umask?!
>

I'm not sure where to put it -- but it seems to work in
/etc/X11/Xsession.d, when I remove it it doesn't work correctly.

I also have it in /etc/profile to cover my bases.

-Andy


andy.graybeal@buddleia:~$ cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi

if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='u@h:w$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi

umask 002
andy.graybeal@buddleia:~$

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-14-2010, 08:37 PM
Derek Maciel
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

So, are you asking that if you had a file X and you copied it to your
flash drive, edited it, and brought it back to your machine as file Y,
you want to know how to make file Y the same permissions as the folder
it's now residing in?

On 14 September 2010 16:13, Andy Graybeal <andy.graybeal@casanueva.com> wrote:
>>
>> Depends how you copy the file... in this case, it looks as though the
>> copy tried to preserve the traditional Posix permissions and therefore
>> ruined your mask. *Was this copy done by nautilus? *You need to copy
>> files wihout preserving their original attributes (at least,
>> permissions) if you want inheritance to work correctly.
>>
>
> I'm still processing what you said. *The copy was done by nautilus. *How
> do I copy files without preserving their original attributes? * I'm
> sorry if this sounds like a lame question.
>
> -Andy
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-14-2010, 08:51 PM
Andy Graybeal
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

On 09/14/2010 04:37 PM, Derek Maciel wrote:
> So, are you asking that if you had a file X and you copied it to your
> flash drive, edited it, and brought it back to your machine as file Y,
> you want to know how to make file Y the same permissions as the folder
> it's now residing in?

I want to create a file on another system (at home for example), bring
it into work, put it into my teams folder and have the ability for the
rest of my team (group) to be able to read and write to it and "others"
to be able to read it.

I have a Tech and Finance folder. I want each file underneath that
folder to be owned by the group a certain group. To keep it simple, the
'tech' group I want to have rw access to the Tech folder recursively as
well the Finance folder, the 'finance' group will have rw access
recursively. I think I got this down with setguid +s.

So for instance... I want all the files in a certain folder to look like
this:

-rw-rw-r--+ 1 andy.graybeal tech 0 2010-09-14 16:32 hansolo

andy.graybeal@buddleia:/srv/Desktop/Tech$ getfacl hansolo
# file: hansolo
# owner: andy.graybeal
# group: tech
user::rw-
group::rwx #effective:rw-
mask::rw-
other::r--

andy.graybeal@buddleia:/srv/Desktop/Tech$

So.. if someone takes a file home and works on it and brings it back, I
think it loses it's permissions, as well as if someone creates a file on
their system at home and brings it in to work.

I hope that makes better sense.

Thank you for asking a clarifying question.
-Andy

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-14-2010, 09:16 PM
Derek Maciel
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

On 14 September 2010 16:51, Andy Graybeal <andy.graybeal@casanueva.com> wrote:
> I want to create a file on another system (at home for example), bring
> it into work, put it into my teams folder and have the ability for the
> rest of my team (group) to be able to read and write to it and "others"
> to be able to read it.
>
> I have a Tech and Finance folder. I want each file underneath that
> folder to be owned by the group a certain group. To keep it simple, the
> 'tech' group I want to have rw access to the Tech folder recursively as
> well the Finance folder, the 'finance' group will have rw access
> recursively. I think I got this down with setguid +s.
>
> So for instance... I want all the files in a certain folder to look like
> this:
>
> -rw-rw-r--+ 1 andy.graybeal tech 0 2010-09-14 16:32 hansolo
>
> andy.graybeal@buddleia:/srv/Desktop/Tech$ getfacl hansolo
> # file: hansolo
> # owner: andy.graybeal
> # group: tech
> user::rw-
> group::rwx #effective:rw-
> mask::rw-
> other::r--
>
> andy.graybeal@buddleia:/srv/Desktop/Tech$
>
> So.. if someone takes a file home and works on it and brings it back, I
> think it loses it's permissions, as well as if someone creates a file on
> their system at home and brings it in to work.

So if I understand correctly, you could create a script in all
locations that could change the owner of each file depending on where
it was.

So the script in your Tech folder could do:
for file in *.*; do chown <some_user>:tech {file}; done


This would change the owner of all the files in the current directory
to <some_user> in the tech group.

I'm just not sure what I should use for <some_user>.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-14-2010, 09:34 PM
Andy Graybeal
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

>>
>> So.. if someone takes a file home and works on it and brings it back, I
>> think it loses it's permissions, as well as if someone creates a file on
>> their system at home and brings it in to work.
>
> So if I understand correctly, you could create a script in all
> locations that could change the owner of each file depending on where
> it was.
>
> So the script in your Tech folder could do:
> for file in *.*; do chown<some_user>:tech {file}; done
>
>
> This would change the owner of all the files in the current directory
> to<some_user> in the tech group.
>
> I'm just not sure what I should use for<some_user>.
>

gahh... i hope this isn't the way to deal with this, no offense.. but it
sounds kludgey, and scary and easily broken.

-andy

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-14-2010, 10:18 PM
Tom H
 
Default umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

On Tue, Sep 14, 2010 at 6:02 PM, Tony Arnold
<tony.arnold@manchester.ac.uk> wrote:
> On Tue, 2010-09-14 at 16:51 +0100, Tony Arnold wrote:
>> On Tue, 2010-09-14 at 11:31 -0400, Tom H wrote:
>> > On Tue, Sep 14, 2010 at 8:06 AM, Andy Graybeal
>> > <andy.graybeal@casanueva.com> wrote:
>> > > This is a repeat question, I'm going to rephrase it a little and maybe
>> > > I'll get a response this time around.
>> > >
>> > > I'm using Ubuntu 10.04, metacity and nautilus, and linux terminal server
>> > > (LTSP).
>> > >
>> > > My umask is set to 002 in my /etc/X11/Xsession.d.
>> > > The filesystem has ACL's enabled.
>> > > I have the folder set with setgid +s.
>> > >
>> > > The ACL's look like this:
>> > > andy.graybeal@buddleia:/srv/Desktop/Tech$ getfacl .
>> > > # file: .
>> > > # owner: root
>> > > # group: tech
>> > > # flags: -s-
>> > > user::rwx
>> > > group::rwx
>> > > other::r-x
>> > > default:user::rwx
>> > > default:group::rwx
>> > > default:mask::rwx
>> > > defaultther::r-x
>> > >
>> > > andy.graybeal@buddleia:/srv/Desktop/Tech$
>> > >
>> > > Why when I copy a file from a jump/flash drive, does it not inherit the
>> > > ACL's properly?
>> > > Here is an example of a file I copied from a jump drive:
>> > >
>> > > andy.graybeal@buddleia:/srv/Desktop/Tech$ ls -lah cabling.txt
>> > > -rwx------+ 1 andy.graybeal tech 2.8K 2010-07-28 20:40 cabling.txt
>> > > andy.graybeal@buddleia:/srv/Desktop/Tech$
>> >
>> > Is "/etc/X11/Xsession.d" the right place for your umask?!
>>
>> umask is ignored if there is a default mask entry.
>>
>> I think the permissions are correct. The defaults in the ACL say a file
>> should get rwxrwxr-x but this is then AND'd with the default mask of rwx
>> giving rwx------
>
> Everyone seems to have ignored my contribution to this thread. If I'm
> wrong just tell me, but please do not just ignore me.

It happens...

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org