Running as non-admin

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Running as non-admin

Postby SomeBloke » 11. April 2010 12:27

How do I go about running the various components when the Windows user account is not an administrator? I know that Apache wants to be able to write to its "logs" directory so I need to allow user Write permissions for that directory. I guess it might be useful to also be able to allow write access to the htdocs directory...

What other directories do the components need write access to, please?
SomeBloke
 
Posts: 5
Joined: 08. April 2010 07:20

Re: Running as non-admin

Postby Nobbie » 11. April 2010 13:01

SomeBloke wrote:I guess it might be useful to also be able to allow write access to the htdocs directory...


What for? Usually Apache delivers HTML documents, but does not store them. Only if you are planning to run CGI scripts that store files into htdocs or if you like to run a WebDAV Server in your DocumentRoot (what I would not recommend).

SomeBloke wrote:What other directories do the components need write access to, please?


The folder(s) for temporary storage, like session data, upload directory etc.
The folder for MySQL data as well as the database folders itself.
All folders (subfolders) that are targets by any CGI Upload scripts (like Gallerys etc.). Usually these folders are created at installation time, so you cannot grant write access yet now, but you have to remember when installing such a script. Many install routines are running a check on writeable folders.

If you are planning to run your server remotely, you must grant write access to all folders in a FTP context (as you need an FTP Server and Client for uploading your files). The FTP User may differ from the Apache User (this is a main issue in linux environments).
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Running as non-admin

Postby SomeBloke » 11. April 2010 15:22

Nobbie wrote:
SomeBloke wrote:I guess it might be useful to also be able to allow write access to the htdocs directory...


What for? Usually Apache delivers HTML documents, but does not store them.


Well, I thought I might actually like to create some HTML documents in order to serve them.
SomeBloke
 
Posts: 5
Joined: 08. April 2010 07:20

Re: Running as non-admin

Postby Narrowboyy » 12. April 2010 00:00

SomeBloke wrote:How do I go about running the various components when the Windows user account is not an administrator?
A Windows User account has restrictions place on Windows System files and folder so the average user can't mess up the System and so in XAMPP you should not have to change anything with regard to permissions.

SomeBloke wrote:I know that Apache wants to be able to write to its "logs" directory so I need to allow user Write permissions for that directory.
No, Apache and MySQL will be able to write to any file or folder by default unless you accidentally change a file or folder to read only which is why you should not need to mess with Windows file and folder permissions unless you know exactly what you are doing.

SomeBloke wrote:I guess it might be useful to also be able to allow write access to the htdocs directory...

What other directories do the components need write access to, please?
Write permissions are enabled by default even though when you right click on a folder you see a box with a square read only attribute. Unless the box carries a specific tick then the folder and files under that folder are writable, even for a normal user.

As a Windows User certain Windows Service configurations will not be permitted and is why in XAMPP you should be logged in as an Administrator if you wish to configure XAMPP's various Windows Services via the Windows Service Control Manager.

To over come this restriction when logged in as a User you would have to right click on a specific Windows item and select to run as an Administrator.

All the above can be found in the Windows Help files on your PC or by visiting the Window's Forums.

In conclusion, as a general Rule you should not need to change any file or folder permissions when installing and running XAMPP - the defaults are just fine and should not be changed.
Narrowboyy
 
Posts: 64
Joined: 16. February 2009 02:56

Re: Running as non-admin

Postby SomeBloke » 12. April 2010 10:21

Narrowboyy wrote:
SomeBloke wrote:How do I go about running the various components when the Windows user account is not an administrator?
A Windows User account has restrictions place on Windows System files and folder so the average user can't mess up the System and so in XAMPP you should not have to change anything with regard to permissions.


But I did have to. Without specifically allowing write access for the user I was running xampp as, Apache was unable to write to its logs directory.

SomeBloke wrote:I know that Apache wants to be able to write to its "logs" directory so I need to allow user Write permissions for that directory.
No, Apache and MySQL will be able to write to any file or folder by default unless you accidentally change a file or folder to read only which is why you should not need to mess with Windows file and folder permissions unless you know exactly what you are doing.


Trust me, just like Tomcat, Apache will not run without being able to write to the logs directory.

SomeBloke wrote:I guess it might be useful to also be able to allow write access to the htdocs directory...

What other directories do the components need write access to, please?
Write permissions are enabled by default even though when you right click on a folder you see a box with a square read only attribute. Unless the box carries a specific tick then the folder and files under that folder are writable, even for a normal user.


I'm not talking about whether a file has a read-only attribute set.

What other directories do the components need write access to, please?
SomeBloke
 
Posts: 5
Joined: 08. April 2010 07:20

Re: Running as non-admin

Postby Nobbie » 12. April 2010 11:04

Narrowboyy wrote:In conclusion, as a general Rule you should not need to change any file or folder permissions when installing and running XAMPP - the defaults are just fine and should not be changed.


No, this has been true for "old" Windows Versions (WindowsXP and prior).

Windows Vista and Windows 7 are coming with a much more sophisticated rights management than the (old and simple) "read-only" tags. It is not like Linux rights management, but its quite different to the the old "single user" environment of old Windows versions. There is in fact the need for granting read/write access to files and folders for users and/or groups.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 61 guests