Page 1 of 1

File permissions on Windows (IIS) servers

Posted: Fri Apr 27, 2007 11:03 am
by Klemen
Hello,

Quite some people are having problems with setting correct permissions to folder attachments and file hesk_settings.inc.php

CHMOD doesn't work on Windows servers, this is a Unix command. On windows servers you need to set correct permissions like this:

1. right-click on the file (or folder) and select Properties
2. select Security tab
3. under Group find Internet Guest Account (IUSR_xxx where xxx is the name of your computer)
4. in Permissions for Internet Guest Account under Allow select:
x Modify
x Read & Execute
x Read
x Write
5. Click Apply and OK

Do this for folder attachments and file hesk_settings.inc.php

Then run the Hesk installation test again and it should show both as Writable.


Q: I don't have the Security tab in Properties?
A: Open Explorer, slect menu Tools > Folder options, go to tab View and under Advanced settings un-check (make sure it's NOT selected) Use simple file sharing. Click Apply and Ok.

Error Uploading Attachments

Posted: Fri Jun 01, 2007 9:14 am
by valverde
I have succesfully upgraded the script, but when I try to attach a file to a ticket I get the following error:

PHP Warning: move_uploaded_file(/httpdocs/sat/attachments/LUQR18Y77A_6968_Festivos_1.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\inspired.com.es\httpdocs\sat\inc\attachments.inc.php on line 58 PHP Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\phpB69.tmp' to '/httpdocs/sat/attachments/LUQR18Y77A_6968_Festivos_1.jpg' in C:\Inetpub\vhosts\inspired.com.es\httpdocs\sat\inc\attachments.inc.php on line 58

I'm running my script in a Windows 2003 shared hosting server

Regards,

Posted: Fri Jun 01, 2007 1:11 pm
by Klemen
PHP probably doesn't have permission to write to the "attachments" folder. Please double-check that you set the correct permissions (as explained above) to the attachments folder, if you have problems start a new thread.

Re: File permissions on Windows (IIS) servers

Posted: Wed Sep 28, 2011 5:04 am
by radfo
I've set everything as recommended in your post and I've done everything as described in the other posts for attachments not working and I still get the same error.

Cannot move file to the attachments folder, please check your server path settings

Not sure what's going on.

Re: File permissions on Windows (IIS) servers

Posted: Sat Oct 01, 2011 2:50 pm
by Klemen
Possible causes:

1. Folder "attachments" doesn't exist

2. The "System/root path:" setting isn't correct (Admin panel > Settings > Help Desk).

3. The permissions for the attachments folder aren't correct

4. File uploads are disabled in your PHP.

Re: File permissions on Windows (IIS) servers

Posted: Tue Dec 20, 2011 6:10 pm
by robmalt1
You must also give the internet guest account rwx permission to the temporary folder.

If you follow the directions in this post you can get the error code(s) explaining why your upload is failing.

After you get the error code(s) you can look them up here.

Re: File permissions on Windows (IIS) servers

Posted: Tue Apr 09, 2013 3:16 pm
by osama.abbas
I have got this error:

File upload failed, try with a smaller or no file attachment

and solve it by creating the folder (Temp) in the following path (D:\Program Files\PHP\) of my server

then give the users of the server full control on this folder

finally I have updated php.ini

upload_tmp_dir="D:\Program Files\PHP\Temp"


this enables me attach files in the ticket.

I hope this help you

Re: File permissions on Windows (IIS) servers

Posted: Tue Apr 09, 2013 6:23 pm
by Klemen
Thanks for sharing your solution!