Koozali.org: home of the SME Server

Uploading files with www user imposible

Offline arcano

  • **
  • 22
  • +0/-0
    • http://www.iems.df.gob.mx
Uploading files with www user imposible
« on: February 09, 2005, 09:43:34 AM »
Some applications use the web user (www in e-smith case) to temporaly upload files on a subdirectory, in most distibutions with the default installation, the www user can have write access. on any ibay i try to set those writes to the www user, on the shell it's done, but back on the aplication it still's haven't write access, I don't find where the problem is, does any body knows what's happen?  


thanks... really!
.........

egerards

Uploading files with www user imposible
« Reply #1 on: February 09, 2005, 12:59:38 PM »
Did you check /var/log/httpd/error_log ? This file often reveals the cause of problems such as yours.

Offline arcano

  • **
  • 22
  • +0/-0
    • http://www.iems.df.gob.mx
still remain the same
« Reply #2 on: February 10, 2005, 06:15:23 AM »
Any trace on /var/log/httpd/error_log. I really don't know, but i guess there is a file, it has to be, that deny the write access to subdirs via www user, i had tried with Atutor on its installation, with xoops using the uploader of the Cjay-Content module, and for what ever app that uses the www user to upload files, no matter if i change dir attributes to 777, i remain writeless... i have used 2 diferent machines with SME, and have the same result.

plus the instalation of SME 6.0.1
 i had: - awstats & mrtg contrib
        - clamav antivirus (Pagefault)
        - durep contrib...
        - DansGuardnan

I don´t think this has something to do with the issue...

does anybody has full working, for example Cjay, or anything else?


 :-(
.........

Offline jahlewis

  • *
  • 151
  • +0/-0
    • http://www.arachnerd.com/
Uploading files with www user imposible
« Reply #3 on: February 10, 2005, 07:52:21 PM »
Also look in /var/log/messages?

Is it an httpd error, or a php error?
............

Offline arcano

  • **
  • 22
  • +0/-0
    • http://www.iems.df.gob.mx
Guess not error!
« Reply #4 on: February 11, 2005, 08:17:04 PM »
I guess is not an error, but i think is a kind of security issue an i haven't found where is the source.
Checking out the /var/log/messages i found that the import_lang.php coudn't wrote to the subdir... that is why...i wrote, no way to write through the www user!


Feb  8 16:43:30 neptune httpd: PHP Warning:  OpenDir: No such file or directory (errno 2) in /home/e-smith/files/ibays/classroom/html/admin/import_lang.php on line 62
Feb  8 16:43:43 neptune httpd: PHP Warning:  OpenDir: No such file or directory (errno 2) in /home/e-smith/files/ibays/classroom/html/admin/import_lang.php on line 62
Feb  8 16:46:19 neptune httpd: PHP Warning:  Supplied argument is not a valid MySQL result resource in /home/e-smith/files/ibays/classroom/html/include/header.inc.php on line 194
Feb  8 16:46:19 neptune httpd: PHP Warning:  Supplied argument is not a valid MySQL result resource in /home/e-smith/files/ibays/classroom/html/include/header.inc.php on line 216

For the header.ini.php  there ar not such lines, then i guess a part of some of the includes, but which one?
... :idea:
.........

Offline arcano

  • **
  • 22
  • +0/-0
    • http://www.iems.df.gob.mx
on import_lang.php
« Reply #5 on: February 11, 2005, 09:07:31 PM »
$import_path = AT_CONTENT_DIR . 'import/';
$archive = new PclZip($_FILES['file']['tmp_name']);
if ($archive->extract(   PCLZIP_OPT_PATH, $import_path) == 0) {
dir ("Error : ".$archive->errorInfo(true));
         exit;
}


thats the content on line 62

when i install this, ihad to make the dirs by hand, with the necesary permits, but they are still unwritable through the web browser, ...
.........

Offline arcano

  • **
  • 22
  • +0/-0
    • http://www.iems.df.gob.mx
By the way
« Reply #6 on: February 20, 2005, 06:33:38 AM »
Does anybody has web applications runnig on the e-smith box? i still haven´t conf the write access on for the www user, i had change the umask for it, i checkout the php.ini for reviewing the upload issue, and change the subdir content rights, it remain the same, i checkout the message and httpd logs, no errors just the warning i posted before....

if any body has web applications running on the sme boxes, that needs to write to a content subdir, please can you split your wisdow bit  little closer!

 :-?
.........