You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Sander Striker <st...@apache.org> on 2001/10/05 21:24:58 UTC

File permision portability

[deliberately crossposted]

Hi all,

Can someone give me a quick answer if file permissions
are made portable in apr.  Specifically, are ntfs acls
mapped to the flags that show up in include/apr_file_info.h?
Subversion needs to portably handle at least the execute and
write permissions, which is my reason for asking.

Sander


Re: File permision portability

Posted by kf...@collab.net.
Good points.  Let's start out with the `execute' bit, and add others
as demand indicates.  I.e., not try to anticipate what is useful,
instead see what people actually have a use for.

-K


Branko =?ISO-8859-2?Q?=C8ibej?= <br...@xbc.nu> writes:
> >Hmm... I think SVN should only worry about the "execute" bit. That is really
> >the only interesting mode. For r/w, we should just use 0666 as modified by
> >the current umask.
> >
> I agree. But I think we will have to have system-specific bits: the 
> "execute" bit only makes sense on Unix, on Windows we'd probably want to 
> remember "system" and "hidden" (and possibly "compressed", although 
> that's going a bit far).
> 
> 
> -- 
> Brane �ibej   <br...@xbc.nu>            http://www.xbc.nu/brane/
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: File permision portability

Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:

>On Tue, Oct 09, 2001 at 02:43:10PM -0500, kfogel@collab.net wrote:
>
>>...
>>Yah -- it sounds like whatever Subversion comes up with as a portable
>>representation for file modes, most of the new code should actually
>>end up in in APR.  Subversion will limit itself to storing and
>>retrieving those representations as svn properties, and of course to
>>actually using them to set perms when appropriate (checkout, update).
>>
>
>Hmm... I think SVN should only worry about the "execute" bit. That is really
>the only interesting mode. For r/w, we should just use 0666 as modified by
>the current umask.
>
I agree. But I think we will have to have system-specific bits: the 
"execute" bit only makes sense on Unix, on Windows we'd probably want to 
remember "system" and "hidden" (and possibly "compressed", although 
that's going a bit far).


-- 
Brane �ibej   <br...@xbc.nu>            http://www.xbc.nu/brane/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: File permision portability

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Oct 09, 2001 at 02:43:10PM -0500, kfogel@collab.net wrote:
>...
> Yah -- it sounds like whatever Subversion comes up with as a portable
> representation for file modes, most of the new code should actually
> end up in in APR.  Subversion will limit itself to storing and
> retrieving those representations as svn properties, and of course to
> actually using them to set perms when appropriate (checkout, update).

Hmm... I think SVN should only worry about the "execute" bit. That is really
the only interesting mode. For r/w, we should just use 0666 as modified by
the current umask.

Consider what happens if we attempt to record unix permissions precisely:

1) User A has set a restrictive umask based on local policy. SVN screws him
   because it ignores his umask, making everything world readable (which was
   the policy on User B's machine, who checked in those files).

2) User B is checking files out into a directory for use by a web server. He
   wants everything to be world readable. But SVN obeys the permissions from
   A and checks out stuff with -rw------- perms.


IOW, you screw the user -- they set a umask according to local policy or
need, but we ignore what *they* want, and instead set privs according to
what *SVN* wants. That is just backwards. Especially because there *isn't*
anything that "SVN wants". It is simply storing content.

Of course, if you start recording permissions, then you're going to end up
with a really messed up repository, as some people are open, and some are
closed. It will be a complete mish-mash of stuff.

The execute bit is the only interesting flag. Store that and we're set.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: File permision portability

Posted by kf...@collab.net.
Ryan Bloom <rb...@covalent.net> writes:
> On Friday 05 October 2001 12:24 pm, Sander Striker wrote:
> > Can someone give me a quick answer if file permissions
> > are made portable in apr.  Specifically, are ntfs acls
> > mapped to the flags that show up in include/apr_file_info.h?
> > Subversion needs to portably handle at least the execute and
> > write permissions, which is my reason for asking.
> 
> They aren't, but they need to be made portable.  When I first wrote the
> file perm code, I didn't have the patience, or the knowledge to do portable
> perms across platforms, so I punted.  If you want to take a stab, I
> am more than happy to help.

Yah -- it sounds like whatever Subversion comes up with as a portable
representation for file modes, most of the new code should actually
end up in in APR.  Subversion will limit itself to storing and
retrieving those representations as svn properties, and of course to
actually using them to set perms when appropriate (checkout, update).

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: File permision portability

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
They are inherently non-portable.  

And ACLs introduce a broad disparity.

Yes, win32 does capture X/R/W for U/G/W (G generally equals U)
for files on WinNT and 2000.  9x has no permission model at all.
We don't have a model yet for setting the perms, however.

Bill

----- Original Message ----- 
From: "Ryan Bloom" <rb...@covalent.net>
To: "Sander Striker" <st...@apache.org>; <de...@apr.apache.org>
Cc: <de...@subversion.tigris.org>
Sent: Friday, October 05, 2001 2:50 PM
Subject: Re: File permision portability


> On Friday 05 October 2001 12:24 pm, Sander Striker wrote:
> > [deliberately crossposted]
> >
> > Hi all,
> >
> > Can someone give me a quick answer if file permissions
> > are made portable in apr.  Specifically, are ntfs acls
> > mapped to the flags that show up in include/apr_file_info.h?
> > Subversion needs to portably handle at least the execute and
> > write permissions, which is my reason for asking.
> 
> They aren't, but they need to be made portable.  When I first wrote the
> file perm code, I didn't have the patience, or the knowledge to do portable
> perms across platforms, so I punted.  If you want to take a stab, I am more than
> happy to help.
> 
> Ryan
> 
> ______________________________________________________________
> Ryan Bloom rbb@apache.org
> Covalent Technologies rbb@covalent.net
> --------------------------------------------------------------
> 


Re: File permision portability

Posted by kf...@collab.net.
Ryan Bloom <rb...@covalent.net> writes:
> On Friday 05 October 2001 12:24 pm, Sander Striker wrote:
> > Can someone give me a quick answer if file permissions
> > are made portable in apr.  Specifically, are ntfs acls
> > mapped to the flags that show up in include/apr_file_info.h?
> > Subversion needs to portably handle at least the execute and
> > write permissions, which is my reason for asking.
> 
> They aren't, but they need to be made portable.  When I first wrote the
> file perm code, I didn't have the patience, or the knowledge to do portable
> perms across platforms, so I punted.  If you want to take a stab, I
> am more than happy to help.

Yah -- it sounds like whatever Subversion comes up with as a portable
representation for file modes, most of the new code should actually
end up in in APR.  Subversion will limit itself to storing and
retrieving those representations as svn properties, and of course to
actually using them to set perms when appropriate (checkout, update).

-K

Re: File permision portability

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 05 October 2001 12:24 pm, Sander Striker wrote:
> [deliberately crossposted]
>
> Hi all,
>
> Can someone give me a quick answer if file permissions
> are made portable in apr.  Specifically, are ntfs acls
> mapped to the flags that show up in include/apr_file_info.h?
> Subversion needs to portably handle at least the execute and
> write permissions, which is my reason for asking.

They aren't, but they need to be made portable.  When I first wrote the
file perm code, I didn't have the patience, or the knowledge to do portable
perms across platforms, so I punted.  If you want to take a stab, I am more than
happy to help.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: File permision portability

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 05 October 2001 12:24 pm, Sander Striker wrote:
> [deliberately crossposted]
>
> Hi all,
>
> Can someone give me a quick answer if file permissions
> are made portable in apr.  Specifically, are ntfs acls
> mapped to the flags that show up in include/apr_file_info.h?
> Subversion needs to portably handle at least the execute and
> write permissions, which is my reason for asking.

They aren't, but they need to be made portable.  When I first wrote the
file perm code, I didn't have the patience, or the knowledge to do portable
perms across platforms, so I punted.  If you want to take a stab, I am more than
happy to help.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------