List Info

Thread: Re: teacup/teapot install question




Re: teacup/teapot install question
user name
2007-09-04 12:45:26
> What determines the permission modes of the files that
are installed
> by teacup?

IIRC at least your 'umask' should play into this. Otherwise
I simply 'file
copy/rename'. This will not touch the permissions IIRC.
Download by http,
but into a variable, and then a plain Tcl 'open' on a temp
file. So, best I
can say 'Tcl dfaults + umask'.

Regarding files coming in a .zip archive ... I am also doing
a plain open
before writing (The zip is decoded with Tcl, not via an
external unzip or
like).

I will have to source dive to see if I do 'file attributes'
actions on them.
I may, but I do not really remember.

Aha ..

	lib/repository/repo_localma.tcl:798:        file
attributes
$path -permissions ugo+x
	lib/repository/repo_localma.tcl:875:            file
attributes
$f -permissions ugo+x

First is in Store/tm ... In case the modules is a shared lib
with attached
vfs. Second is in Store/zip, for all files underneath, in
case they are
shared libs.

Seems that I may have to add ugo+r as well.


> The reason I ask is that I'm seeing a significant
number of the
> files with strange permissions.

> This is on SPARC Solaris 9. The files have been
installed by teacup
> over a variety of versions, so I don't have just one
version I can list.

> The reason I ask is that I'm seeing quite a variety.
>
> For instance, 348 of the files installed have rwx--x--x
permission mode.
> It would seem to me that would mean that only the owner
on the file would
> actually be able to successfully do a package require
on these items.

Yes, from the permissions that is the case.

> 627 of the files have rwxr-xr-x as their permissions.

Hm.

> 7 of the files - none of them the .tm files - have
rw-r--r-- permission.

Images ? Other supporting files ?

> 2 of the files have rw------- as their permission -
these are both
> pkgIndex.tcl files. Again, this would seem to prevent
anyone else from
> using this teapot.

> I'm just curious about the state of things.

Note also htt
p://bugs.activestate.com/show_bug.cgi?id=72044

I am inviting comments.

--
	Andreas Kupries <andreaskActiveState.com>
	Developer  http://www.ActiveState.com

	Tel: +1 778-786-1122


_______________________________________________
ActiveTcl mailing list
ActiveTcllistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs

Re: teacup/teapot install question
country flaguser name
United States
2007-09-04 13:06:09
-----Original Message-----
From: Andreas Kupries [mailto:andreaskactivestate.com] 


>> 7 of the files - none of them the .tm files - have
rw-r--r--
permission.

> Images ? Other supporting files ?

$ find /tmp/.lwv/teapot/. -perm 644 -print | xargs ls -ld
-rw-r--r--   1 lwv27    dept27       268 Aug 21 09:33
/tmp/.lwv/teapot/./config/1.0/TeapotConfiguration
-rw-r--r--   1 lwv27    dept27   72887296 Aug 21 09:33
/tmp/.lwv/teapot/./indexcache/teapot.activestate.com/INDEX
-rw-r--r--   1 lwv27    dept27   1347584 Aug 28 14:24
/tmp/.lwv/teapot/./repository/INDEX
-rw-r--r--   1 lwv27    dept27     41984 Aug 28 14:24
/tmp/.lwv/teapot/./repository/INSTALLLOG
-rw-r--r--   1 lwv27    dept27       977 Aug 28 14:24
/tmp/.lwv/teapot/./repository/package/solaris2.6-sparc/lib/p
kgIndex.inde
x
-rw-r--r--   1 lwv27    dept27       778 Jul 19 15:38
/tmp/.lwv/teapot/./repository/package/tcl/lib/pkgIndex.index

-rw-r--r--   1 lwv27    dept27       108 Jul 26 15:23
/tmp/.lwv/teapot/./repository/teapot.local-ma.config

Note that I am not claiming that any of these are wrong -
the permission
looks fine to me. It was more confusing to see files with
the execute
bit on that one would never execute...


>> 2 of the files have rw------- as their permission -
these are both 
>> pkgIndex.tcl files. Again, this would seem to
prevent anyone else
from 
>> using this teapot.

>> I'm just curious about the state of things.

> Note also htt
p://bugs.activestate.com/show_bug.cgi?id=72044

> I am inviting comments.

It seems to me that it would be most beneficial for teacup
to set the
permissions on the files it is installing so that, by
default, the
permissions would be rw-r-r- (except, perhaps, for a type
of
application, where the default might be rwxr-xr-x), and then
let the
user's umask alone so that if they so chose, they could turn
off the
group and/or other permissions.



-- 
<URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this
posting
should be construed as representing my employer's opinions.
<URL: mailto:lvirdengmail.com > <URL: http://www.purl.org/
NET/lvirden/
>
 
_______________________________________________
ActiveTcl mailing list
ActiveTcllistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )