Spartacus and its files owned by "nobody"

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
josemartinezx
Posts: 4
Joined: Sun May 04, 2008 7:09 am

Spartacus and its files owned by "nobody"

Post by josemartinezx »

After checking several CMSs, I decided to use Serendipity for setting up a small website. Everything seemed to work flawlessly, but I'm afraid I have found a problem I cannot solve without the help of my webspace provider.

It happens that I have configured Spartacus for getting templates and plugins. It does its job, but all the files and directories it retrieves are owned by "nobody", which makes impossible to me to manipulate them afterward. (Specifically I need to upload translated language files to some plugin directories to make them work in my native language)

I have no root access in that server. And I suppose that the hosting company will not allow me to have it.

As I said, I have had to ask for help to my shared webserver admin. But I don't want to bother him over and over again whenever I want to change/delete those files. I have tested the ftp-uploading features of Spartacus, but they don't seem to help (the created files through this procedure are still owned by "nobody").

Is there any way to use Spartacus without having this problem? Or is it easier just to upload the templates/plugins by hand? Does anybody have extra suggestions for not having to deal with this situation again?

Thanks in advance,

-JM.
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Post by abdussamad »

This is partly a problem created by your provider. Basically they haven't properly configured permissions so that files created by php are also accessible by you. Anyway there is an option in spartacus that allows you to specify what permissions downloaded files should have. That may solve your problem.

To access these options log in to your admin panel then click configure plugins> scroll down to the event plugins and click on spartacus. You'll be taken to the spartacus config page where you can configure the owner of the download files and the file's permissions. Insert your ftp user name there and the permissions as 0777.
josemartinezx
Posts: 4
Joined: Sun May 04, 2008 7:09 am

Post by josemartinezx »

Thanks for your quick answer and support.

I have already tried that, but I still get files owned by "nobody".

I mean, I have alrerady set the right user in the field you are mentioning, and the permissions are already set to 0777. When I check newly created files, all of them have the correct set permissions (0777), but the wrong ownership (nobody).

That's strange, because I originally thought that those would be created through a FTP connection. But that evil "nobody" gets in somehow.

I am already in touch with my webspace provider, but I am not sure if he will do something for reconfiguring its PHP engine.

Probably I am configuring Spartacus wrong, but I think everything is on its place. Does anybody have an example config I can use to compare it with mne? Does anybody have more suggestions?

Thanks again,

-JM.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If you changed ownerships in the spartacus config, those are only applied to new plugins downloaded. Old plugins are not changed, those need to be changed by you or the provider. you might want to have a look at the "fixperm.php" script that is mentionied in the s9y.org FAQ.

If it persists also for new files, this is because your provider blocks chmod/chown calls. There is nothing that a PHP script can do in such a case.

Scripts are by default created through the PHP process. FTP is only involved if you configure Spartacus with FTP privileges (since s9y 1.3)

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
josemartinezx
Posts: 4
Joined: Sun May 04, 2008 7:09 am

Post by josemartinezx »

garvinhicking wrote:Hi!

If you changed ownerships in the spartacus config, those are only applied to new plugins downloaded. Old plugins are not changed, those need to be changed by you or the provider. you might want to have a look at the "fixperm.php" script that is mentionied in the s9y.org FAQ.

If it persists also for new files, this is because your provider blocks chmod/chown calls. There is nothing that a PHP script can do in such a case.

Scripts are by default created through the PHP process. FTP is only involved if you configure Spartacus with FTP privileges (since s9y 1.3)

HTH,
Garvin

Yes, I supposed that only the new plugins/templates would take the new ownership set by Spartacus, but they actually didn't.

I did everything you mention and the newly downloaded plugins/templates are stored under the "nobody" user and group. Now I can change them, I can even delete them, but I can't turn into their owner (I receive an "Operation not permitted" message when I try to change their ownership).

Well. At least I can already modify the files (this is due to the 0777 permissions). Which is what I was looking for. But I think it is weird that the "downloaded files owner" option in Spartacus has no effect.

I am still not satisfied, but it works.

Thanks for your help,

-JM.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

This is only becaues your provider blocks chown calls - if it weren't blocked, the files would get their configured owner. This is sadly nothing that Serendipity can influence, as it's a server-wide setting that has been disabled for you.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
josemartinezx
Posts: 4
Joined: Sun May 04, 2008 7:09 am

Post by josemartinezx »

garvinhicking wrote:Hi!

This is only becaues your provider blocks chown calls - if it weren't blocked, the files would get their configured owner. This is sadly nothing that Serendipity can influence, as it's a server-wide setting that has been disabled for you.

Best regards,
Garvin
Well, that finally makes sense to me. Too bad, then. I am going to try to persuade them for unblocking those chown calls.

Thank you for all your great support. I am really happy not only with Serendipity (over all, the most convenient software solution for my needs), but also with its friendly community.

Best regards,

-J.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You're welcome, I hope you'll continue to have fun with Serendipity. And maybe your provider will unleash the chown-Call to you :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
3nd3r
Regular
Posts: 71
Joined: Tue Aug 19, 2008 12:58 pm
Location: NeoMadrid, Spain
Contact:

Re: Spartacus and its files owned by "nobody"

Post by 3nd3r »

Sorry for recover this old post, but I did a search and seems the issue is the same for me.
I've tried all things in this post, but the owner is still 99:99 when I install a new plugin using Spartacus (but 0777 permission at last).

So, I've asked my provider about chown calls, and they tell me there isn't any chown call block, so... maybe I have my Spartacus config set in a wrong way?:

Enable the use of Spartacus for fetching plugins? Yes
Enable the use of Spartacus for fetching themes? Yes
Enable remote plugin version information No
Secret key to Remote plugin version information spartacus_remote
Ubicación del archivo/réplica (XML metadata) Netmirror.org
Ubicación del archivo/réplica (files) Netmirror.org
Custom location for mirror [empty]
Dueño de los archivos descargados pajareo:pajareo
Permisos de los archivos descargados 0777
Permisos de los directorios descargados 0777
Use directory creating using ftp in safe_mode? No
FTP server address [empty]
FTP username [empty]
FTP password [empty]
FTP serendipity directory /

Thanks for your time.
Try not. Do, or do not. There is no try.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Spartacus and its files owned by "nobody"

Post by garvinhicking »

Hi!

Upload this script and execute it in your brwoser (as test.php for example):

Code: Select all

<?php
$fp = fopen('test.log', 'w');
fwrite($fp, 'XXX');
fclose($fp);
print_r(fileinfo('test.log'));
echo "\n<br />\n";

chown('test.log', 'pajaero');
chmod('test.log', 0777);
print_r(fileinfo('test.log'));
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
3nd3r
Regular
Posts: 71
Joined: Tue Aug 19, 2008 12:58 pm
Location: NeoMadrid, Spain
Contact:

Re: Spartacus and its files owned by "nobody"

Post by 3nd3r »

Thanks for your quick answer.

I copied the code (replacing 'pajaero' by 'pajareo') in a test.php file. I uploaded to /public_html and run in Opera like http://www.pajareo.com/test.php

The result in the browser is the same text code you wrote, and no test.log file created...
Try not. Do, or do not. There is no try.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Spartacus and its files owned by "nobody"

Post by garvinhicking »

Hi!

That is HTML code there; you need to paste it as plaintext, the code needs to be exctly the same when you paste it, and when you view the HTML source there may be no <html> surrounding etc.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
3nd3r
Regular
Posts: 71
Joined: Tue Aug 19, 2008 12:58 pm
Location: NeoMadrid, Spain
Contact:

Re: Spartacus and its files owned by "nobody"

Post by 3nd3r »

You can grab it from http://www.pajareo.com/test.php and see it for yourself...
I don't know where is the mistake...
Try not. Do, or do not. There is no try.
3nd3r
Regular
Posts: 71
Joined: Tue Aug 19, 2008 12:58 pm
Location: NeoMadrid, Spain
Contact:

Re: Spartacus and its files owned by "nobody"

Post by 3nd3r »

Sorry, I'm a complete idiot... :roll:

I've uploaded right file and this is the result in browser:

Code: Select all

Fatal error: Call to undefined function fileinfo() in /home/pajareo/public_html/test.php on line 5
And now, I've got a test.log file wich contains only:

Code: Select all

XXX
Try not. Do, or do not. There is no try.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Spartacus and its files owned by "nobody"

Post by garvinhicking »

HI!

Hm., okay replace "fileinfo" with "lstat" instead, that should work?

Who'S the owner of your test.log file, and which permissions does it have?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply