Page 1 of 1

'Nobody": ownership of files created by makesite

PostPosted: Wed Jun 29, 2011 9:36 am
by manifold
Hello all,

This is arguably more a server administration issue than a Xataface issue, but perhaps it can be (or has been) addressed by here.

On many servers, files that are generated by the execution of a script or program (such as makesite) through the server's php or Apache engine will show the created files as being owned by 'nobody'. In the case of Xataface, files created in the templates_c directory are owned by 'nobody' and not by the creator of the file (or the logged-in user). This means that those files can not be manipulated ... or removed!

There are a variety of approaches to handling this problem (products like suPHP, CGI Wrapper, etc); but these are subject to a variety of configuration constraints which can vary by server and administrator.

Is it possible to alter the makefile script so as to add a 'chown' command (change ownership) of a file to the script, so that the file that is created has its ownership changed from 'nobody' to the logged-in user as part of the program execution? For instance, as makesite executes a 'mkdir' command, could it then execute a 'chown -R' on the created file or directory?

TIA for your suggestions!

-manifold

Re: 'Nobody": ownership of files created by makesite

PostPosted: Wed Jun 29, 2011 9:51 am
by shannah
If you run the makesite script under your own user account through ssh then the files will be owned by you. How are you running the makesite script?

For the templates_c directory there is a clear_cache action that will clear out the contents of this directory. Just point your web browser to your application with -action=clear_cache

e.g.
http://example.com/myapp/index.php?-action=clear_cache

-Steve