[Tutor] permissions and other hairpulls

Sean 'Shaleh' Perry shalehperry@attbi.com
Sun May 11 13:24:02 2003


On Sunday 11 May 2003 05:56, Kirk Bailey wrote:
> permissions in FreeBSD are the most fustrating aspect of web scripting.
>

a good unix book might help here.  Using a perm of 666 is almost always a bad 
idea.  Use 664 if you have to group permission.

> Here is an error:
> Traceback (innermost last):
>     File "/www/www.listville.net/cgi-bin/TLlistmaker2.py", line 195, in ?
>       os.chmod(fullpathtoscript+'/lists/'+mylist,666)
> OSError: [Errno 79] Inappropriate file type or format:
> '/www/www.listville.net/cgi-bin/lists/test33'
>

most odd.  I have no good idea about the cause to this.  A few google searches 
reveal only weird questions from people with NFS issues.

If you try to run chmod by hand on the file, does it do anything interesting?

> The script is attempting to set the mod to 666 for a file just created and
> closed. It is created by the script, and examination shows it is 644.
> Another scipt is trying later to add to it, and failing, for a permissions
> reason. ALL scripts are 755, owned by nobody:wheel. All such text files are
> also nobody:wheel, and work fine when 666, but problems when 644. Any
> suggestions from the brethern?

most likely group needs permission to write for some reason (not sure what the 
file is or does).