This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setup doesn't set right permissions


"Thrall, Bryan" wrote:

> Setup isn't setting file permissions correctly all the time. For
> example, the attached Cygwin tarball:
> 
> $ tar tjvf release/permstest/permstest-1.0.0-1.tar.bz2
> drwxr-xr-x thrall/FSUsers    0 2007-08-23 10:48:32 testdir/
> -rwxr-xr-x thrall/FSUsers    0 2007-08-23 10:48:32 testdir/testfile
> 
> But when setup installs the 'permstest' package, I get:
> 
> $ find /testdir -exec ls -l {} \;
> total 0
> -rwxr-x---+ 1 thrall Users 0 Aug 23 10:48 testfile
> -rwxr-x---+ 1 thrall Users 0 Aug 23 10:48 /testdir/testfile

Sorry but setup doesn't know anything about permissions.  If I recall
correctly it does set a DACL when it initializes but other than that it
does not do anything with the file modes stored in the tar file when
creating files.  So this isn't expected to work and never has.  You can
fixup any files or directories that have specific mode requirements with
a postinstall script that calls chmod.

There is a fair amount of code in the Cygwin DLL to do this mapping
between POSIX modes and NT ACLs, and it would all have to be duplicated
or reimplemented in setup because setup has to be self contained and
can't use any Cygwin code.  And then there would be two places to
maintain any changes.

> Simply untarring from the command line works just fine.

The command line tar has the luxury of using the Cygwin DLL so it gets
this for free.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]