Page 1 of 1

File uploads not working. Ownership issues?

Posted: Wed Jun 16, 2010 1:39 am
by Lukevdp
Hi Everyone,

Here is what I'm doing and the problem I'm getting.

1. Log in and go to file manager
2. Click the upload files tab
3. Upload a file

I get an error message "[filename] failed to upload successfully" and a troubleshooting link that goes to http://wiki.cmsmadesimple.org/index.php ... leshooting

I've read through that page, but it seems to be written for linux servers, and I don't know how to do the equivalent on this server.

I've done all the permissions/masks stuff. I've got 14 CMSMS sites installed on this server. It's a Windows/Plesk server. All of the other sites upload fine. The permissions are fine.

I'm running the latest version of CMSMS. Heres the data from system information


CMS Version
1.7.1

Installed Modules
CMSMailer
2.0
FileManager
1.0.2
MenuManager
1.6.3
ModuleManager
1.3.3
News
2.10.5
nuSOAP
1.0.1
Printing
1.0.4
Search
1.6.3
ThemeManager
1.1.1
TinyMCE
2.7.0
FormBuilder
0.5.6
Statistics
1.0.1

Config Information
php_memory_limit:

process_whole_template:
true
max_upload_size:
8000000000
default_upload_permission:
644
assume_mod_rewrite:
false
page_extension:

internal_pretty_urls:
false
use_hierarchy:
false
debug:
false
output_compression:
false
root_url:
http://www.kilmoredistricthospital.org.au
root_path:
c:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs (0777)
previews_path:
c:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\tmp\cache (0777)
uploads_path:
c:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\uploads (0777)
uploads_url:
http://www.kilmoredistricthospital.org.au/uploads
image_uploads_path:
c:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\uploads\images (0777)
image_uploads_url:
http://www.kilmoredistricthospital.org. ... ads/images
use_smarty_php_tags:
false
locale:

default_encoding:
utf-8
admin_encoding:
utf-8
PHP Information:
Current PHP Version (phpversion):
5.2.5
md5 function (md5_function):
On (True)
GD version (gd_version):
2
tempnam function (tempnam_function):
On (True)
Magic quotes in runtime (magic_quotes_runtime):
Off (False)
Is E_STRICT disabled in error_reporting (E_STRICT):

PHP Effective Memory Limit (memory_limit):
128M
Maximum Execution Time (max_execution_time):
30
PHP Safe Mode (safe_mode):
Off (False)
Session Save Path (session_save_path):
C:\Windows\Temp (0777)
Sessions are allowed to use Cookies (session_use_cookies):
On (True)
Checking if the httpd process can create a file inside of a directory it created (create_dir_and_file):

PHP register_globals (register_globals):
On (True)
PHP output_buffering (output_buffering):
On
disable_functions in PHP (disable_functions):

PHP Open Basedir (open_basedir):

Test for remote URL (test_remote_url):

fsockopen: Connection ok! 
fopen: Connection ok!
File uploads (file_uploads):
On (True)
Maximum Post Size (post_max_size):
8M
Maximum Upload Size (upload_max_filesize):
8M
Basic XML (expat) support (xml_function):
On (True)
Test file_get_contents (file_get_contents):
On (True)
Test ini_set (check_ini_set):
On (True)
Server Information:
Server API (server_api):
cgi-fcgi
Server Database (server_db_type):
MySQL (mysql)
Server Database Version (server_db_version):
5.0.45
Server Software (server_software):
Microsoft-IIS/7.0
Server Operating System (server_os):
WINNT 6.0 On i586

Permission Information
tmp:
c:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\tmp (0777)
templates_c:
C:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\tmp\templates_c (0777)
modules:
c:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\modules (0777)
File Creation Mask (umask):
C:\inetpub\vhosts\kilmoredistricthospital.org.au\httpdocs\tmp\cache (0777)
config_file:
0666
config.php writable. It is more safe if you change permission to read-only


(Yes I know everything is writable, I'm going nuts trying to figure this out)

Anybody got ideas on how I can fix this?

Cheers,

Luke

Re: File uploads not working. Ownership issues?

Posted: Fri Jun 18, 2010 3:57 am
by Lukevdp
anybody?

Re: File uploads not working. Ownership issues?

Posted: Fri Jun 18, 2010 4:31 am
by Nullig
How large is the file you're trying to upload?
Have you tried a small file, to see if it works?

Nullig

Re: File uploads not working. Ownership issues?

Posted: Fri Jun 18, 2010 1:07 pm
by Lukevdp
Hi Nullig,

Thanks for the reply.

The problem exists for files of all sizes.

Cheers,

Luke

Re: File uploads not working. Ownership issues?

Posted: Fri Jun 18, 2010 1:19 pm
by calguy1000
This sounds like the standard 'Windoze ACL's SUCK' problem with PHP.

Googling for PHP, Windows and is_writable I found this...
microsoft c runtime library only reports the read-only flag from its stat() implementation; if the file is not marked as read-only in the regular file attributes (eg: what you see using attrib or dir commands), then PHP (and any other ANSI C program) will see it as writable.
In summary, PHP doesn't like Advanced windoze ACL controls... so don't use them

Re: File uploads not working. Ownership issues?

Posted: Fri Jun 18, 2010 2:38 pm
by kermit
my question for OP is... why on earth are you hosting cmsms in production environment on a *windows* server? ewwww.
calguy1000 wrote: This sounds like the standard 'Windoze ACL's SUCK' problem with PHP.

Googling for PHP, Windows and is_writable I found this...
microsoft c runtime library only reports the read-only flag from its stat() implementation; if the file is not marked as read-only in the regular file attributes (eg: what you see using attrib or dir commands), then PHP (and any other ANSI C program) will see it as writable.
In summary, PHP doesn't like Advanced windoze ACL controls... so don't use them
if the problem were with the windows server, wouldn't it be affecting ALL of the hosted sites (14 according to OP), not just one?

Re: File uploads not working. Ownership issues?

Posted: Fri Jun 18, 2010 2:44 pm
by calguy1000
kermit.... not if the permissions were setup differently (using windoze ACL's) for that directory.

It's easy enough to fug with the permissions on a directory-by-directory basis that it's entirely possible that one site could be fugged while others arent.

As far as windoze hosts... I agree (well, I have a general allergy to MS Products anyways).  *nix is the only way to go for web hosting...

Re: File uploads not working. Ownership issues?

Posted: Mon Jun 21, 2010 1:32 am
by Lukevdp
Thanks Calguy - I'll ask the host to turn it off and hopefully it works.
kermit wrote: my question for OP is... why on earth are you hosting cmsms in production environment on a *windows* server? ewwww.
Because the decision was made without me. Trust me, if it were up to me, the sites definitely WOULDN'T be on one. But unfortunately, we don't always have control over these decisions.

Re: File uploads not working. Ownership issues?

Posted: Mon Jun 21, 2010 3:27 am
by Lukevdp
Calguy,

The web host doesn't know what Advanced ACL is or how to turn it off. I've looked around and I also can't find it. Would you be able to point me in the right direction?

Cheers,

Luke

Re: File uploads not working. Ownership issues?

Posted: Mon Jun 21, 2010 1:43 pm
by kermit
calguy1000 wrote: kermit.... not if the permissions were setup differently (using windoze ACL's) for that directory.
on a shared server running a control panel like plesk, that should not be an issue, unless someone at the root/administrator level went in and specifically changed something on one account or directory.

Re: File uploads not working. Ownership issues?

Posted: Thu Jun 24, 2010 11:36 pm
by Lukevdp
kermit wrote:
calguy1000 wrote: kermit.... not if the permissions were setup differently (using windoze ACL's) for that directory.
on a shared server running a control panel like plesk, that should not be an issue, unless someone at the root/administrator level went in and specifically changed something on one account or directory.
So any solutions then? Happy to donate/pay.