Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Peter Tribble
On Mon, Aug 24, 2009 at 5:55 PM, Richard Elling wrote: > ... >> No it shouldn't. >> >> Alice$ cd ~/proj1; ln -s /etc ., >> >> Alice$ echo "Hi helpdesk, Bob is on vacation and he has a bunch of >> files in my home directory for a project that we are working on >> together.  Unfortunately, his umask

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Joerg Schilling
Richard Elling wrote: > >>> Helpdesk$ pfexec chmod -fR a+rw /home/alice/proj1 > >>> > >>> Alice$ rm /etc/shadow > >>> Alice$ cp myshadow /etc > >>> Alice$ su - > >>> root# > > One could achieve the same result with a request to chmod a+rw > > /etc/shadow, but this would be more noticeable. > > >

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Joerg Schilling
Will Murnane wrote: > >> Helpdesk$ pfexec chmod -fR a+rw /home/alice/proj1 > >> > >> Alice$ rm /etc/shadow > >> Alice$ cp myshadow /etc > >> Alice$ su - > >> root# > One could achieve the same result with a request to chmod a+rw > /etc/shadow, but this would be more noticeable. > > One of my frie

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Richard Elling
On Aug 24, 2009, at 10:22 AM, Will Murnane wrote: On Mon, Aug 24, 2009 at 12:55, Richard Elling wrote: Alice$ cd ~/proj1; ln -s /etc ., Alice$ echo "Hi helpdesk, Bob is on vacation and he has a bunch of files in my home directory for a project that we are working on together. Unfortunately,

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Will Murnane
On Mon, Aug 24, 2009 at 12:55, Richard Elling wrote: >> Alice$ cd ~/proj1; ln -s /etc ., >> >> Alice$ echo "Hi helpdesk, Bob is on vacation and he has a bunch of >> files in my home directory for a project that we are working on >> together.  Unfortunately, his umask was messed up and I can't modif

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Richard Elling
On Aug 24, 2009, at 8:32 AM, Mike Gerdts wrote: On Mon, Aug 24, 2009 at 8:08 AM, Edward Ned Harvey> wrote: It's a strange question anyway - You want a single file to have permissions (suppose 755) in one directory, and some different permissions (suppost 700) in some other directory? Then

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Mike Gerdts
On Mon, Aug 24, 2009 at 8:08 AM, Edward Ned Harvey wrote: >> >It's a strange question anyway - You want a single file to have >> permissions >> >(suppose 755) in one directory, and some different permissions >> (suppost 700) >> >in some other directory?  Then some users could access the file if >>

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Casper . Dik
>My point exactly. I'm being bold or brazen or ignorant by saying: There is >no point to do a chmod and not follow symlink. Chmod should always follow >symlinks. That's why it's the default behavior, and that's why it's rare, >strange, or impossible to override that behavior. As long as you

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Edward Ned Harvey
> >It's a strange question anyway - You want a single file to have > permissions > >(suppose 755) in one directory, and some different permissions > (suppost 700) > >in some other directory? Then some users could access the file if > they use > >path A, but would be denied access to the same file

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-24 Thread Casper . Dik
>It's a strange question anyway - You want a single file to have permissions >(suppose 755) in one directory, and some different permissions (suppost 700) >in some other directory? Then some users could access the file if they use >path A, but would be denied access to the same file if they used

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-23 Thread Bob Friesenhahn
On Sun, 23 Aug 2009, Edward Ned Harvey wrote: It makes no sense to attempt setting perms on a symlink. The perms are determined by the actual file. The symlink is just another name for the file itself. If you want to change perms of the file, change the perms of the file. Actually it does m

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-23 Thread Edward Ned Harvey
> >How can I prevent /usr/bin/chmod from following symbolic links? I > can't find any > >-P option in the documentation (and it doesn't work either..). > > Maybe find can be used in some way? > > > Not possible; in Solaris we don't have a lchmod(2) system call which > makes > adding a chmod optio

Re: [zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-23 Thread Casper . Dik
>Hello! > >How can I prevent /usr/bin/chmod from following symbolic links? I can't find >any >-P option in the documentation (and it doesn't work either..). > Maybe find can be used in some way? Not possible; in Solaris we don't have a lchmod(2) system call which makes adding a chmod option (l

[zfs-discuss] How to prevent /usr/bin/chmod from following symbolic links?

2009-08-22 Thread Kris Larsen
Hello! How can I prevent /usr/bin/chmod from following symbolic links? I can't find any -P option in the documentation (and it doesn't work either..). Maybe find can be used in some way? Background: When I'm running chmod on my backup folder structure containing a copy of a Linux root director