Run XAMPP for non-admin users

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Run XAMPP for non-admin users

Postby MarkT08 » 02. September 2014 16:51

Hi. I was just wondering how a non-admin user can run Xampp without being prompted for admin password. I have students that need to run Xampp but I cannot give them full admin rights to the Mac OS. Appreciate any advice.

Forgot to add using Xampp version 1.8.3-5 on OS X 10.9.4
Last edited by MarkT08 on 02. September 2014 16:53, edited 1 time in total.
MarkT08
 
Posts: 4
Joined: 02. September 2014 16:47
Operating System: OS X 10.9.4

Re: Run XAMPP for non-admin users

Postby Nobbie » 02. September 2014 18:12

This is a little an odd question.

What do you mean with "run Xampp"? In fact, there is no need that students (i.e. normal users) can start Apache and/or MySQL; this should be done by root (and it definitaley needs root permission). once at boot time.

On the other hand, everybody else may have its own home directory for his own HTML and PHP files, these are accessible via mod_user for example and there is no need for the user to create the files with root permission.

Therefore I am a bit confused what you mean with this request. Why do you think, that students need admin rights? For what?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Run XAMPP for non-admin users

Postby MarkT08 » 03. September 2014 09:04

Ok ill try explain again as my previous 'odd' post was obviously not clear enough. Non-admin users are prompted for admin credentials when they "open" the Xampp control panel. They need to be able to open the control panel so they can stop and start the Apache/MySQL/ProFTPD services for testing various projects. I cannot give these users full admin rights on the mac so I was wondering is there a way to bybass this?
MarkT08
 
Posts: 4
Joined: 02. September 2014 16:47
Operating System: OS X 10.9.4

Re: Run XAMPP for non-admin users

Postby Altrea » 03. September 2014 09:48

starting/stopping OS processes which are opening and closing ports is an admin task, so promping for admin priviledges is the only way to go
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Run XAMPP for non-admin users

Postby Nobbie » 03. September 2014 12:19

MarkT08 wrote:Non-admin users are prompted for admin credentials when they "open" the Xampp control panel.


Only if these users are booting the machine! You need only to start Xampp once. Simply start the workstation every morning (or ever let it run for weeks - why not?) and start Xampp once (you may even start it automatically as a system service!), when you switch off the workstation , Xampp is shutdown as well.

You simply should not switch off the Workstation, it should be sufficient, that each user logs in and out instead. Modern Mainboards and CPUs "fall to sleep" with very very low energie consumption, mostly less than always to switch on/off the machine for each user.

But even if you would like to switch off the machine after a student loggs off, you still may start Xampp automatically at boot time as a service (which is automatically done with root permission), because Apache and MySQL may be run as system service. This is "normal" way how to start Apache etc. The Xampp Control panel is meant only for clueless enduser, but an educated admin *should* be able to start Apache and MySQL as a system service automatically at boot time.

For example, I am currently working with an Ubuntu Notebook and I installed the autostart of Xampp to the system autostart - when the notebook has booted, everyhing is already started and i do not have to know any admins credentials (as a standard user). I even do not use Xampps Control Panel. On Unix systems the "init" process (corresponding to /etc/init.d) is responsible for the task of starting system services. I dont know OSX well, but as a "unixoid" OS there should be something very similar to that.

P.S.: As i found out with the help of wikipedia, the "init" process of Unix have been replaced by the "launchd" Process in MacOSX. With the help of launchd you may start Apache Daemon (httpd) and MySQL Daemon (mysqld) automatically on startup.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Run XAMPP for non-admin users

Postby MarkT08 » 03. September 2014 15:24

These are dual boot macs (75 in total), possibly booted into either Windows or OS X about 8-10 times per day depending on the class being thought. So leaving them booted into Mac OS X is a no-go. As an educated System Admin on Windows I installed the access control file "SubInACL.exe" and created a batch file that calls that .exe and assigns 'full control' permissions to non-admin users for services like apache, MySQL, apache tomcat, filezilla. Batch file contents below for anyone that would like to use is. SubInACL.exe can be downloaded from MS website....

cd c:\program files (x86)\windows resource kits\tools
c:
subinacl /service \\%computername%\apache2.4 /grant="domain\group or username"=F
subinacl /service \\%computername%\mysql /grant="domain\group or username"=F
subinacl /service \\%computername%\Apache Tomcat Tomcat7 /grant="domain\group or username"=F
subinacl /service \\%computername%\FileZillaServer /grant="domain\group or username"=F

So it now works on Windows and the Academic staff that requested Xampp are happy to teach there class on the Windows partition...
MarkT08
 
Posts: 4
Joined: 02. September 2014 16:47
Operating System: OS X 10.9.4

Re: Run XAMPP for non-admin users

Postby Nobbie » 03. September 2014 19:06

MarkT08 wrote:So leaving them booted into Mac OS X is a no-go.


"No-go" is a typically german WRONG translated anglicism - in the USA "no-go" means something completely different as in germany. So where are you from?

MarkT08 wrote:As an educated System Admin on Windows I installed the access control file "SubInACL.exe" and created a batch file that calls that .exe and assigns 'full control' permissions to non-admin users for services like apache, MySQL, apache tomcat, filezilla.


Sorry, but this is a cludgy "solution"! You might simply activate "Run as service" and run at startup in the control panel and everything is fine.

MarkT08 wrote:So it now works on Windows and the Academic staff that requested Xampp are happy to teach there class on the Windows partition...


It is "their class" not "there class". And why did you ask for MacOSX? The WIndows Solution is quite easy (see above).

If you are interested in a MacOSX environment, i would simply read the documentation about "launchd" and start Xampp on MacOSX (as you originally requested).

Gehe ich Recht in der Annahme, dass Du eigentlich aus Deutschland anfragst (die Fehler in den englischen Erklärungen sind allzu typisch für Deutsche)? Wieso fragst Du nicht auf Deutsch, das hier ist grundsätzlich ein deutsches Forum, was von Deutschen betreut wird?!
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Run XAMPP for non-admin users

Postby MarkT08 » 03. September 2014 22:20

I completely disagree that the solution I suggested above is 'cludgy'. One exe install and a very tidy batch file, both installed on a master image, which is then pushed out to all other clients via deploy studio without any further action required to get Xampp to work for standard users.. Boom job done...!!! Originally posted here on the Xampp OS X forum as I was working on the Mac side of a dual boot image. As it turned out getting Xampp running on the Windows partition was sufficient. thanks for the English lesson, your skills are wasted here, you should be out there (or is it their) in the big bad world ready to point out peoples grammar mistakes while incorrectly making assumptions about where they are from...
MarkT08
 
Posts: 4
Joined: 02. September 2014 16:47
Operating System: OS X 10.9.4

Re: Run XAMPP for non-admin users

Postby Nobbie » 04. September 2014 12:02

MarkT08 wrote:I completely disagree that the solution I suggested above is 'cludgy'. One exe install and a very tidy batch file, both installed on a master image, which is then pushed out to all other clients via deploy studio without any further action required to get Xampp to work for standard users.. Boom job done...!!


Das ist doch oberschlecht im Vergleich dazu, einfach nur ein simples Häkchen im Xampp Control Dialog zu setzen (Super Booooooommm!!).
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 39 guests