.htpasswd file above htdocs can't be read by server [SOLVED]

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

.htpasswd file above htdocs can't be read by server [SOLVED]

Postby moonwalker_repeat » 02. June 2017 08:21

So in a previous thread I had some trouble getting a basic auth script working. I'll post a link to that here in a few moments.

You can see the original issue here if you like:

https://community.apachefriends.org/f/viewtopic.php?f=29&t=75764

Once I solved the issues with bad fonts screwing up the script I was still left with a 500 server error due to the server scripts not being able to read the folder or .htpasswd file that was in it. That, as I suspected, was due to permissions stupidity on the OS X host. I'm one stubborn bugger though, and ALWAYS refuse to believe there is no work around. I suspected that the reason the files couldn't be located or read was because "system" was not a user on either the folder or the .htpasswd file. I was right, but you would not believe how many other people over the years have tried to find out how to add system as user in a folder or file, only to be met with, "Why would you want to do that?" and no answers at all.

Well, I figured out how and it doesn't require messing with the terminal.

HOW TO ADD SYSTEM AS USER TO OS X FOLDERS AND FILES.

Step 1. FIND a folder or a file that already has system as a user. (Check the "get info" window)
Step 2. DUPLICATE the folder or file.
Step 3. DELETE the contents of the folder or file, and replace with your own files or code.
Step 4. RENAME the folder or file and place where desired.

VIOLA! Xampp can now find the folders and files it couldn't find before.

DONE.
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Nobbie » 03. June 2017 10:36

"Grauenhaft... da rollen sich mir die Fußnägel auf!" (German)

Open a terminal, and enter "man chmod", as well as "man chown" and finally "man chgrp" and read all of these manuals carefully. You must be system admin in some cases in order to execute, therefore enter "sudo chmod ...." etc. in order to execute the commands. Enter the password of your UserID when asked. Have fun!
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby moonwalker_repeat » 04. June 2017 08:18

You may have time for that. Many do not. I find it nice to know it can be done without all that.
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Nobbie » 04. June 2017 09:46

i dont believe its a question of time. Anyway, what will you do if the parent folder has wrong permissions and even will not allow you to put any files or folders into it? You are wasting your time by such poor "solutions" and not vice verse. Of course you may do what you want, but to the rest of the world: dont follow that poor advice, its the wrong direction.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby moonwalker_repeat » 09. June 2017 05:49

Time is everything. No matter who you are. Most of us want Xampp to simply WORK for our website environments. The whole reason most of us download and install it is because it's easy and doesn't take as much time as learning how to deal with full blown Linux installations, which I'm sure you know are far more complicated and involve far more command line instructions to implement properly. That, in point of fact, is exactly why Apachefriends developed Xampp to begin with. To avoid all that crap at least as much as possible. I don't, and most of Xampp users do not, have time to mess around with reading multiple manuals. Most of us are about getting Xampp up and running, and CUSTOMIZED to our preferences, so that we can run and develop our websites as quickly and simply as possible. If you think that by not reading everything available on the subject is more of a waste of time, have fun with that. I've been using Xampp in various renditions for nearly ten years now, and know from experience that it CAN be customized AND tweaked as much as anyone wants.

Xampp is an OPEN SOURCE stack of OPEN SOURCE software and web applications. Open Source means it is left UNENCRYPTED for the express purpose of being modified according to every individual user's preference. Therefore, we are ALL free to modify it to suit our individual needs, and YOU have nothing to say about whether what we need is appropriate or not. Your opinion is worth as much as we think it is. If you think what we want to do shouldn't be done, that opinion is worth nothing to anyone but yourself. If you think otherwise, then you do not understand what OPEN SOURCE means at all.

Stop trying to force your own idea of what is "the right way" and what is "the wrong way" to do things with Xampp. They are your own IDEAS, and may be fine for you, but may not suit the needs of others.
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Nobbie » 09. June 2017 10:15

BLablablablabla...

You are barking up the wrong tree. Of course you may do everything you want and of course you may run an Online Server and you may modify whatever you want. But dont expect any support, that is NOT included in your open source visions. If you are in any troubles (even if you have a hacked server) go and ask somewhere else, you wont get any support in the Xampp forum. Thats all.

moonwalker_repeat wrote:If you think that by not reading everything available on the subject is more of a waste of time, have fun with that.


Yes, i do believe strongly that its a waste of time to struggle around with folders and files without knowing anything about it and without a global overview, how these things are working. You are wasting youre time by such poor "hacks", i gonna read that manual once and then i know how to do for my whole life. You have to start from scratch with each new problem, i mostly know within seconds what the problem is - because i took the little time to look into the manuals.

moonwalker_repeat wrote:I've been using Xampp in various renditions for nearly ten years now, and know from experience that it CAN be customized AND tweaked as much as anyone wants.


And you are still a NOOB in comparison. I also used Xampp since 10 years, but i also learned how to configure Apache, MySQL and PHP and Perl without Xampp. I learned how to program in HTML, PHP and Perl, i learned about Apache configuration, I learned about server configuration, about TCPIP, about SQL, about File Systems, about Users and rights management, about Linux vs. Windows, about OSX vs. Linux, about this and that and that. And all that i learned by simply reading the manual and practicing due to the manuals. I have become a huge expert in all these things, whereas you remain a poor little Webprogrammer without any knowledge about your OSX system. You still cannot setup a wevserver without Xampp. You still have no Linux skills, the most important OS for webservers. Are you proud of that? I wouldnt. I have never asked in any forum about any problem, i all found it on myself in reading articles and manuals. And that knowledge remains forever.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby moonwalker_repeat » 10. June 2017 22:06

Nobbie wrote:BLablablablabla...



Thanks for the maturity and help. :roll:
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby moonwalker_repeat » 11. June 2017 20:24

MUCH better solution: Enable root user login and work on Xampp configuration only as that user. It can be risky but overcomes many permissions issues. You can, if necessary, add system (yourself if you are logged in with that account) as user and owner. No terminal necessary.

https://support.apple.com/en-us/HT204012

This alone solved every issue I've had over the past week. I've completely uninstalled Xampp then started from scratch using system account. Took a couple of hours total (including reinstalling two working websites and configuring). Xampp now running exactly as I want it to.

Happy days!
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Altrea » 11. June 2017 20:33

@moonwalker_repeat:
You can do what ever you want and whatever works for you on your system.
I cannot agree with any of your alternative solutions and cannot recommend other users to use them.
To lower the security of a system just to avoid using the terminal seems like a bad strategy to me.
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Nobbie » 11. June 2017 21:27

Altrea wrote:I cannot agree with any of your alternative solutions and cannot recommend other users to use them.


Yes, I totally agree. Its horrible!
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby moonwalker_repeat » 12. June 2017 04:40

Altrea wrote:@moonwalker_repeat:
You can do what ever you want and whatever works for you on your system.
I cannot agree with any of your alternative solutions and cannot recommend other users to use them.
To lower the security of a system just to avoid using the terminal seems like a bad strategy to me.


Fine. You don't have to. It's a free world for the most part. Look, all I want is a development platform up and running as suits my particular needs as quickly as possible.

Please note: I am NOT advocating anyone put their systems at risk by making them publicly available. In point of fact, that isn't what I'm doing either.

Rather than simply stating you don't agree, how about explaining WHY? What, in what I've done, creates a security risk exactly? Simply stating bluntly there is no reason to do what I've done (which is simply NOT true ~ what on earth do you know about my environment? Nothing. That's what.

You people need to learn to be more helpful than critical by ASKING more about why someone may want to do something instead of simply shooting down every question you don't agree should be asked. That's just childish.

By the way, solutions are solutions, and ALL of them are alternatives to something. If mine are so all fired "horrible" then delete all my posts. In fact, go ahead and delete my entire profile. I really don't care. This forum was no help to me to begin with.
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby moonwalker_repeat » 17. November 2017 06:12

I would like to add a couple of thoughts to this thread for anyone who stumbles across it. First of all, I would like to thank Altrea for helping in another thread by pointing out a problem with character types messing up syntax. The advice helped and I appreciate that.

Rather than leave this thread dangling like it has been for the past several months however, I'd like to ask Altrea in particular to address the last comments left here by him. The most important comment was:

To lower the security of a system just to avoid using the terminal seems like a bad strategy to me.


If you please, for my benefit as well as others reading, can you explain why it is you feel that I've lowered the security of my system? This is NOT meant as a challenge. It is meant as an honest question because I feel as though you are telling me I've done something dangerous, but then not explained what how and why it is dangerous, leaving me and possibly others to simply wonder what the problem is.

The reason I am asking now after all these months is pretty simple. I've been running a Xampp server since I started this thread for months now with virtually - actually no, not virtually, but literally - no intrusions. Keep in mind I have taken other precautions that I am not going to share here for security reasons (which should be obvious). I had some issues that I needed help with because being submerged in many issues I simply could not see what might be obvious to someone not involved. I sometimes throw a problem out there (on rare occasions here) to see if someone else can see the obvious that I can't see due to being too deeply submerged in a project with [other] many problems that I actually CAN solve on my own.

Why am I explaining so much? Not because I think anyone CARES about what I think, but because I honestly want you and others here to understand and BELIEVE that I'm NOT here to promote unsafe practices or to challenge anyone with my "superior intellect" (Yeah, right! As if that even exists! :P It doesn't.)

I came here for the same reason most people do. To get help and LEARN. That's what forums are for. I TOTALLY understand that Apache Friends doesn't want people to use Xampp as a full fledged online server because they have intentionally made Xampp for use by developers as a development environment, and by virtue of making it easier to set up and use have rendered the system much easier to be hacked. And that is not what I'm doing.

Anyway, would you at least agree that an explanation of why what I have done equates to "lowering the security of my system" might actually be valuable information to the public? And if you do agree, can you please offer more details as to why you feel this is true?

Thank you.
OS X 10.9.5
XAMPP: 5.6.30-1

I'm setting up a proper server and only need advice to repair an old Xampp installation so I can move my sites safely without breaking them. Thanks for understanding.
User avatar
moonwalker_repeat
 
Posts: 32
Joined: 30. May 2017 05:38
Location: Earth
XAMPP version: 5.6.30
Operating System: OSX, Windows 10

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby HokuApps » 17. November 2017 07:08

Time is everything. Regardless of your identity. The majority of us need Xampp to just WORK for our site surroundings. The entire reason the vast majority of us download and introduce it is on account of it's simple and doesn't require as much investment as figuring out how to manage all out Linux establishments, which I'm certain you know are significantly more confounded and include much more summon line guidelines to execute appropriately.

Xampp is an OPEN SOURCE heap of OPEN SOURCE programming and web applications. Open Source implies it is left UNENCRYPTED for the express reason for being adjusted by each individual client's inclination. In this manner, we are ALL allowed to alter it to suit our individual needs, and YOU have nothing to say in regards to whether what we require is proper or not. Your feeling is worth as much as we think it seems to be. On the off chance that you think what we need to do shouldn't be done, that conclusion merits nothing to anybody except for yourself. In the event that you suspect something, at that point you don't comprehend what OPEN SOURCE implies by any stretch of the imagination.

Quit endeavoring to constrain your own concept of what is "the correct way" and what is "the wrong route" to get things done with Xampp. They are your own IDEAS, and might be fine for you, however may not suit the requirements of others.
HokuApps
 
Posts: 22
Joined: 11. September 2017 07:23
XAMPP version: 1.8.0
Operating System: Windows

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Nobbie » 17. November 2017 11:08

HokuApps wrote:Quit endeavoring to constrain your own concept of what is "the correct way" and what is "the wrong route" to get things done with Xampp. They are your own IDEAS, and might be fine for you, however may not suit the requirements of others.


Of course. But you overlooked something very important: who gives the support? Don't forget, we are here in the Xampp Support Forum. Whoever comes here has a problem with Xampp. Whoever has put together his own environment is wrong here. Because that's my right, I decide who I can help and who I can't help. And I can't help if someone doesn't meet the Xampp standards and then has a problem that I can't reconstruct and can't understand.

Unfortunately, Open Source does not include free support. Exactly that, what everybody is going for here.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: .htpasswd file above htdocs can't be read by server [SOL

Postby Nobbie » 17. November 2017 11:22

moonwalker_repeat wrote:Anyway, would you at least agree that an explanation of why what I have done equates to "lowering the security of my system" might actually be valuable information to the public?


No, its not. As long as you are a private user in your private LAN, of course you can do what you want and there is no problem. Besides one problem that will remain: if you gonna work with root permissions the whole time, you accidently might destroy (delete) very important parts of your system. You wont be the first nor the last who accidently killed his PC. The less you know, the greater the risk of making a terrible mistake.

Apart from that, it's not really a problem, but here in the forum we have often found that users don't use Xampp (as recommended) as a development environment, but as a production server. And then, of course, it is a problem if you violate basic security measures. Of course, this does not automatically mean that a server is hacked, but the risk is simply higher and you should keep the risk as low as necessary and not unnecessarily high for convenience. Its a recommendation, not more, not less. If your server has been hacked, that's just your problem. At least here, no one will help.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Next

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 14 guests