Time for some apache/chmod/permission trouble again (SOLVED)

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Time for some apache/chmod/permission trouble again (SOLVED)

Postby SrNupsen » Sun Aug 19, 2007 8:35 pm

I spent a hell of a lot of time the last days setting up a website for a company, only to discover when I started to submit news that Coranto would generate this type of files:

Code: Select all
drwxrwxrwx    2 okourt   okourt       4096 Aug 19 19:28 ./
drwxrwxrwx   15 okourt   okourt       4096 Aug 19 18:11 ../
-rw-r--r--    1 www      www           589 Aug 19 22:22 1.php


1.php has been created by a Maginot Static profile. It has permissions 644, which is good, because the web server requires PHP files to have that in order to run.

What is NOT so nice is that apparently Coranto is running as user 'www' - and the webserver won't let anyone run a PHP script in their browser if the script is owned by www! (when I goto http://www.thesite.no/1.php, I get a 500 internal server error)

Change of plans

Notice how the current directory (.) is 777? Let's see what happens if I delete the 1.php file, chmods the current directory to 755 ('chmod 755 .') and do a full rebuild:

Code: Select all
Unable to open /correct/path/to/1.php. Permission denied at /path/to/coranto/crcore.pl line 281.


Hm. It seems that Coranto NEEDS that directory to be 777 in order to write files into it, but then writes files that nobody can access in their browser.

Right now, the only way I can get build news to succeed, is to run the Autobuild script (which runs, I presume, as my user instead of as www). When I do that, the above directory listing turns into this:

Code: Select all
drwxr-xr-x    2 okourt   okourt       4096 Aug 19 22:33 ./
drwxrwxrwx   15 okourt   okourt       4096 Aug 19 18:11 ../
-rw-r--r--    1 okourt   okourt        589 Aug 19 22:33 1.php


It works! The file is now owned by okourt (my user). However, I'm not too comfortable telling my client that she has to telnet into her box and run a shell script every time she wants to build news.

Anybody got any ideas? Can I have Coranto run as myself instead of as www?
Last edited by SrNupsen on Wed Aug 22, 2007 9:37 am, edited 1 time in total.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Dale Ray » Mon Aug 20, 2007 3:53 am

I remember having a similar problem on a server where the owner of the file was always the same as the person who uploaded the script that created the file.

So - if I FTPed into the root of my web hosting account and navigated to a sub-directory on that account that served to host the files for a domain and set up Coranto it would act in a similar fashion to your problem.

There were also problems with directories created from the FTP root account.

When I say root FTP account I mean the one that the hosting company set up for access to the lowest level of my hosting space.

I had to create an FTP account that took me directly to the site directory and upload Coranto using that account.

You could try checking the owner of the Coranto files and changing that?

This happened about three years ago so I hope that my memory of it is accurate (and helpful).
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby SrNupsen » Mon Aug 20, 2007 9:14 am

The owner of the Coranto files is okourt (my user). It won't let me change it, and if I try chmod anything else than 755 for coranto.cgi it won't run.

I'm awaiting an answer from their helpdesk on this one.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby SrNupsen » Wed Aug 22, 2007 9:39 am

Got an answer. Their customer support is excellent. Basically, it's how the server is set up. Since www.okourt.no is still pointing to the old server, I was using http://whatever.domeneshop.no/www.okourt.no for developing. This was causing all my scripts to run as www.

He set up a subdomain for me instead, and now everything is working like a charm.

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 5 guests

cron