Gossamer Forum
Home : Products : Links 2.0 : Customization :

changing rights of html files after create

Quote Reply
changing rights of html files after create
Hi there,

Is there a way to change files rights generate by nph-build?
all files generate by nph-build have owner nobody and as rights 0600 and therefore are not readable through the internet. $build_dir_per is only working on the directory but not on the files.

Please help
Marcel
Quote Reply
Re: [Marcel Emmen] changing rights of html files after create In reply to
Hi!



There is a script called nobody.cgi that could help, make a search for it on the web and You should find it. The other way to do it is to ask Your ISP to remove it and then You reupload it. Have You chmoded the directory the file is in to 0777? Scripts created by scripts on Your webspace often becomes owned by nobody and are not changable.
Quote Reply
Re: [Gokboet] changing rights of html files after create In reply to
Correct. You may want to ask your host if they can set up SuEXEC on your server, which will let the script run as your username...and therefore create the files in your name...so YOU can CHMOD them, without having to get a script to do it Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] changing rights of html files after create In reply to
The must be a easy'er way.
If files are generate by a script i is possible to chmod form that script and change the rights for the files created. For directory's this already has been done in links 2.0 by the variable $build_dir_per

so it must be possible to do the same for generate files inside the script. Unfortunatally i don't know where to put chmod in the script and also i don't know how to give the command inside the script.

Marcel
Quote Reply
Re: [Marcel Emmen] changing rights of html files after create In reply to
There is another possibility. Rename all the files owned by "nobody" to soething completely different. Check so that the correct chmod value is put in the script, either 0777 or 777 and do a rebuild. Please make sure that the folders You have created are all chmoded to 0777 or 777 otherwise Your permissions will be wrong again.

Whar ftp programa re You using. I use SmartTP and all I do to change chmod is to mark the file or folder, click on the right mousebotton and choose properties/chmod and in there print 777 or 0777.
Quote Reply
Re: [Gokboet] changing rights of html files after create In reply to
Your other option is to get your host to CHOWN the files to your user...it should only take em 5 seconds to do..and then just go through and CHMOD all the files yourself to 666, and directories to 775 Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] changing rights of html files after create In reply to
Do i have to ask him everytime I make new category's or new templates? Not a good solution. There must be a better solution. I know that it is possible to let a cgi script to change the rights of these files. If this script is call from the browser this will work. However i haven't got the knowlehge to make a script that change the rights

Marcel
Quote Reply
Re: [Marcel Emmen] changing rights of html files after create In reply to
Yes..you could install SuEXEc..like I said easrlier Wink

Or, in the nobody.cgi script, you could add a chmod() command to CHMOD certain files to whatever permission you set ;)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] changing rights of html files after create In reply to
Oke,

I have use nobody.cgi to change the index.html inside the /pages directorie.
Now everything seems to work ok, or do i need to change also the index.html files inside the new,cool,ratings and category directory's? The index.html files in these directory's have still only 0600 as rights but that seems no problem because all the functions are working through the index.html page in the /pages directory or i'm i forgotten something?

Marcel
Quote Reply
Re: [Marcel Emmen] changing rights of html files after create In reply to
The html files have to be chmod to at least 666 to be overwritten. The easiest way to do this is to rename your link directory where all the new, cool, ratings and so on files are. Make sure that You have 0777 in build script then create a new folder with the name of the linkfolder, chmod to 777 and then do a rebuild from within the admin. If everything turns out correctly You can then remove the folder You change name on.