Page 1 of 1

[solved] chown() files after creation? An Ownership issue

Posted: Tue Nov 25, 2008 8:27 pm
by JeremyBASS
Hello, I have an issue on my new server we are putting this sites on.. This is the problem... I have User as hsdfe3 / Group as apache and a sticky bit for the permissions working out to 2755 ... now this works to allow files my ftp client places (User as hsdfe3 / Group as apache) to have the apache user (User as apache / Group as apache ) to use and change the file along with the ftp client because User as hsdfe3 is the owner of the file... but when User as apache creates a file it is with apache as owner... now the ftp client is unable to make changes...

so the short is this.... is there something already available to us to do a chown() so that all file created by User as apache to be owed as User as hsdfe3 so both apache and hsdfe3 can make changes to file according to the permissions?

any other options would be great as well... thanks for the help...

jeremyBass

Re: chown() files after creation?

Posted: Wed Nov 26, 2008 5:00 am
by Nullig
You can use the CMSMS File Manager to change permissions.

Nullig

Re: chown() files after creation?

Posted: Wed Nov 26, 2008 5:12 am
by JeremyBASS
I was looking for something a little less time consuming... but... if I can chown in filemanger then I should be able to set something up to do that automatically on file creation from cmsms? thanks for the help...
Jeremy

Re: chown() files after creation?

Posted: Wed Nov 26, 2008 7:55 am
by alby
JeremyBASS wrote: I was looking for something a little less time consuming... but... if I can chown in filemanger then I should be able to set something up to do that automatically on file creation from cmsms? thanks for the help...
You cannot do chown in filemanager (chmod only)
These commands are SO dependant.
In general you must be a "superuser" for perform these operation, unprivileged user maybe (SO dependant) can perform a chgrp (change group) only

Alby

Re: chown() files after creation?

Posted: Wed Nov 26, 2008 4:04 pm
by JeremyBASS
whlie I can chown if I tunnel... I just don't want to do that after every file CMSMS makes...

Re: chown() files after creation?

Posted: Wed Nov 26, 2008 4:47 pm
by alby
JeremyBASS wrote: whlie I can chown if I tunnel...
tunnel?
ssh? why not build a bash and a cron script? Or try with php system call

Alby

Re: chown() files after creation?

Posted: Wed Nov 26, 2008 5:12 pm
by JeremyBASS
;) that’s why I'm asking... I knew I could tunnel and have been... but I have not had to do the server end this much before... I'm an animator by trade that happens to have done a bunch of websites for a few international science groups and now, I can't seem to get away from  it... only reason I love CMSMS is I don't have to go so deep anymore and was thinking that there might be something already done for that which would run off a ?? file creation post??

So, if I got you right,  your recommending to build a bash and a cron script... ?? or your recommending a php system call... I have example of the php system calls.. but... Well I think I'd need to put the ??root user and pass in??... little scary for a php script since it's the system's.... at least if I understand right... found nothing yet on the cron job but timed scripts and thought that was the way it was... which would cause lags that would drive my up a wall... lost on which way would be the best...  :-\

Any help here is greatly appreciated as I said.... I'm a GD and animator by trade here.. thanks again...
jeremyBass

Re: chown() files after creation?

Posted: Sun Nov 30, 2008 3:15 am
by JeremyBASS
ok ... so here is the fix...

http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/FileManager/Troubleshooting#.27.27.27.2A_An_error_occurred_while_trying_to_create_the_directory_.28Troubleshooting.29.27.27.27

I wrote that as it has been throw out that the hand book need our help filling it... if someone would go over it and tighten it up as I'm not that great of a writer but it's a solid fix to the issue... should work on all to most apache servers... anyways

the short of it is this... in order to keep all security on the up and up.. FACLS (http://linux.about.com/library/cmd/blcmdl1_setfacl.htm)  was the work around... now CMSMS acts right and is happy...

Let me know if a change is needed to the wiki... just trying to help out...

jeremyBass