changing php write permissions in XAMPP on Windows 7

66,390

Solution 1

Windows is generally less restrictive about read/write-permissions. If you did not install XAMPP into C:\ProgramFiles chances are good, that setting file-permissions does not apply to your installation. In the unlikely case, that your PHP-log shows warnings/errors regarding file permissions, then changing them like you described (with settings > permissions) is the way to go. You just have to find out, under which user name apache is running (via Administrative Tools, Services) and add read/write permissions for that user in the appropriate folder.

In short, you can ignore the sections on setting file permissions on Windows.

Solution 2

Basically, the user that Apache runs as needs to able to write to the files.

So firstly, check process list to determine which user that is. Then simply give that user write permission to those files/folders.

(I'm not a XAMPP or Win 7 user so can't give exact directions but I'm sure you'll work it out.)

Share:
66,390
expiredninja
Author by

expiredninja

100% amateur programmer.

Updated on July 12, 2022

Comments

  • expiredninja
    expiredninja almost 2 years

    I'm trying to install a file-based blog engine in XAMPP, but all of these projects require write permissions to be changed. I'm assuming they are not talking the Windows setting that can be accessed through 'properties'. Any idea where/how to change this? seems like an easy question but i'm coming up short. Thank you.

  • Jorge Orpinel Pérez
    Jorge Orpinel Pérez over 9 years
    I have Apache2.4 in Administrative Tools > Services and when opening it's properties it's not clear to me which user runs it. It reads "Log on as: Local system account" in the Log On tab. In the process explorer, the httpd.exe processes have User Name SYSTEM.
  • Jorge Orpinel Pérez
    Jorge Orpinel Pérez over 9 years
    I guess SYSTEM is the user name since it comes up when trying to change a folder's permissions in its properties (in the Windows Explorer). However Window doesn't really let you remove many of the permissions for SYSTEM or for yourself/admin group. And denying permissions to other users doesn't really seem to do anything (PHP always reads them as 0777 for folders and 0666 for files). Windows permission suck!