XAMPP permission denied on all conf files - apache

I want to make some changes to the apache conf file in my xampp application. However, I seem to be unable to alter permissions on the conf files in any way. I only seem to be able to access the conf whenever I mount, but can get permission over the files in any way.
Im running the lates XAMPP version 7.3.2 / PHP 7.3.2 on macOS.
Any ideas?

As I thought, I made a stupid mistake, I installed the XAMPP-VM instead of the normal installation. Switching to non VM obviously fixed it.

I would suggest following method. (Not to compromise the security too much.)
Open Terminal in XAMPP VM
Go to the etc folder
cd /opt/lampp/etc
Change the permission on the conf file.
chmod 777 https.conf
Explore the mounted volume
Open "https.conf" file with any editor you prefer and modify the content.
Change the permission back on the conf file.
chmod 644 https.conf

Related

symlink on bash on windows : apache tries to open a .htaccess that doesn't exist

i try to work on a php project that uses symlinks (it was developped on linux).
i'm on windows, i use bash on windows aka bash on ubuntu on windows aka windows subsystem for linux as a development server.
when apache tries to reach a file within the symlinks it fails.
e.g. when i try to open /var/www/website/symlink/index.html it returns a 403 :
[core:error] [pid 742] AH00554: Access to file /var/www/website/symlink/.htaccess denied by server: not a regular file
i don't know why but it seems apache tries to open a .htaccess file that does not exist, and of course fails at it.
(the symlink points out of the scope of the virtualhost root)
everything is 777.
i can successfully access /var/www/website/symlink/index.html from the command line.
i can successfully access the index.html file when i remove the symlink and copy its target directory instead.
i've tried to delete symlinks and recreate them, it doesn't change anything.
i've tried to create /var/www/website/symlink/.htaccess but it doesn't change anything.
does it sound like a bug or a bad apache configuration or something else ?
this issue was related to this bug : https://github.com/Microsoft/BashOnWindows/issues/650
i got everything to work by removing symlinks and recreate them without trailing slash.
it seems that in a symlink with a trailing slash every directories and every files exist (just try to cd dsfkjhgfkdshjajklhdaf e.g.)
this explains that apache was finding a non existent .htaccess file and was desperately trying to read it.
i wonder when this bug will get fixed though...

Kompozer Can't "Publish" web page to my Raspberry Pi Server

I'm not sure how to set the publication settings...
... My RPi is at 192.168.2.126, and is running Apache and ftp.
... The site is to be located in the folder /var/www/GarageDoor on the RPi
... The site is accessed as http://192.168.2.126/GarageDoor/GarageDoors.html
I'm also concerned because my ftp client can't move the file(s) associated with this site directly to /var/www/GarageDoor either. I end up transferring them to my /usr folder, then copying the files manually to the /var/www... folder.
Seems like you need "sudo" permission to copy a file to this folder. I can't figure out how to give either Kompozer or my ftp client such permission. (I'm using bitvise sftp client)
Any ideas would be appreciated.
This sounds a lot like a permissions error. Enter the following into the raspberry pi command line:
sudo chmod 777 /var/www/GarageDoor/GarageDoors.html
Because that would make the file readable by anyone. If that doesn't work, try the +x option to make the file executable.
sudo chmod +x -R /var/www/GarageDoor
Note on the second command: This will make all files in /GarageDoor have executable permissions. (-R is for recursive)

Apache returning 404 for requests inside /javascript directory

I have a project with several sub-directories. Everything works just fine, except if I try to access files inside the /root/javascript directory, I get a 404. The files do in fact exist, and I am in fact typing the path correctly. If I simply rename the directory I can then access the files. Rename it back, and I get the 404 again. VHost file works fine. No .htaccess files involved.
Apache version: 2.4.9
OS: Ubuntu 13.10
After much searching and trying different things, here's what the problem came down to:
By default, Apache 2.4 on Ubuntu enables a config file called javascript-common, which redirects any requests to files inside /javascript (that is, a directory at the root of your project called 'javascript') to /usr/share/javascript.
Solution 1
Use the following command to disable the javascript-common configuration file:
a2disconfig javascript-common
Solution 2
Add your JavaScript files inside that /usr/share/javascript directory. That way Apache will actually find those files and no 404 will be returned. One benefit of doing things this way is that you won't need multiple copies of the same files (jquery.js, etc.js) that multiple projects use...
Solution 3
Delete the directory /usr/share/javascript, and create a symbolic link that points to your project's /javascript directory. Keep in mind that if you have more than one project (vhost file), they will all serve from the same JavaScript file from the original project. In other words, this is probably not the best solution...
The a2disconfig solution didn't work for me, but then through some searching, I realized that the javascript-common is something that can be uninstalled.
So I fixed the problem by removing javascript-common:
sudo apt-get remove javascript-common
I'm not sure the point of this package, or why it would be installed automatically, but I'm glad that my javascript files are loading again!
I am running Ubuntu 14.04.1 LTS with the lamp-server bundle
Encountering the same problem, I found a similar answer resolved it.
sudo a2disconf javascript-common
sudo service apache2 restart
After the a2disconf (and note it is apparently now a2disconf and not a2disconfig)
I did get a message to execute "sudo service apache2 reload"
the reload did not resolve the issue... thus the restart
as an aside -- I cannot imagine what the developers were thinking when they loaded this little gem -- some of my javascript files might be viable across domains... but certainly not all !
You could just override /javascript alias in your .conf to reflect what you want:
Alias /javascript /my_custom_dir

Apache gives 403 forbidden

I recently had to reinstall Ubuntu and everything else as my SSD crashed.
I've got Apache/MySQL/PHP set up and can access localhost/ without problems. Running PHP and MySQL works fine as well.
I keep my projects in a Dropbox folder (since the crash) located at /home/powerbuoy/Dropbox/Projects/ and have set up VHOSTs that point to some of the projects in there. I've also set up /etc/hosts so that I can access my projects through http://project-name.dev.
However, when I try to visit http://any-project.dev all I get is 403 forbidden. I've run chmod -R 777 Projects/ and all the files and folders are now green in the terminal. That didn't help.
I checked the error-logs and they say:
[crit] [client 127.0.0.1] (13)Permission denied: /home/powerbuoy/Dropbox/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
But there isn't even supposed to be a .htaccess file anywhere there.
I even set up a completely empty project (/home/powerbuoy/Dropbox/Projects/test/index.php with just <?php phpinfo() inside), set up a VHOST and a http://test.dev URL. I get the same error here.
Any ideas?
Thanks
Edit: I tried moving my test project to the desktop (/home/powerbuoy/Desktop/test/) and now it works :P
Perhaps it has something to do with the projects being located inside the Dropbox folder??
Most probably this is a chmod issue. You must change all trees chmod settings. If you have ssh access you can try this commands:
chmod 755 $(find /home/user/public_html -type d)
chmod 644 $(find /home/user/public_html -type f)
Please replace /home/user/public_html part to 'your real path'.
Apparently simply chmoding the directory the project is in wasn't enough. I had to chmod all the directories higher up in the tree as well.
So even though my VHOST pointed to /home/powerbuoy/Dropbox/Projects/AProject/ simply chmoding /AProject/ is not enough but it has to be done all the way from /home/powerbuoy/ it seems.
The reason you had to chmod the permission going up the directory tree is that Linux doesn't permit you to simply access a folder such as /home/jsmith/my_folder directly. You have to also have execute permissions to / /home/ and /home/jsmith . The execute bit allows the affected user to enter the directory, and access files and directories within it.

Joomla - Warning! Failed to move file error

I have found some solutions to this error and tried implementing them but none of which has worked and hope that some here at SO might have a different answer.
I get this error, "Warning! Failed to move file" when I try install modules into my new installation of Joomla here:
http://sun-eng.sixfoot.co.za
Here's some solutions I have tried to no avail:
http://forum.joomla.org/viewtopic.php?f=199&t=223206
http://www.saibharadwaj.com/blog/2008/03/warning-failed-to-move-file-joomla-10x-joomla-15x/
Anyone know of another solution to this please?
Thanks!
Go to Help -> System Info in your administrator backend and check your Directory Permissions tab to make sure everything is writable.
Also make sure your Path to Temp Folder is correct in Site -> Global Configuration.
Finally, check to make sure that the module isn't already installed. It's possible that some files already got copied or something and now your system is having problems overwriting them.
If none of this works, let us know if the error message specifies which file can't be moved. That would help figure out a solution.
In the configuration folder change the temporal folder location to /tmp (public $tmp_path = '/tmp';) or create your own temperate folder and set it to /myowntemp and change the file permission to 777. you are good to go .
This is typically a file permissions issue. If the system cannot write to the tmp directory within Joomla it will give you the "Warning Failed To Move File" error.
The typical solution is to make the directory wide-open, in general a bad practice but a quick fix. You log in to the Linux command line via a terminal (telnet or ssh) session and set the permissions of the directory.
# chmod -R 777 ./tmp
The better option is to find out what user/group the Apache server is running as and assign the permissions accordingly. For example, if Apache is running your site as the myuser:nobody user:group then you can open up write permissions for the group by changing ownership of the tmp folder and making it writable by anyone in the group:
# chgrp -R nobody ./tmp
# chmod -R 775 ./tmp
Security can be a pain to get set correctly if you don't know *nix commands and security settings, so most people just blast a huge hole in the security with chmod 777.
The next thing you'll probably run into is another error message about not being able to update a specific directory. Again, this is a permissions issue and is typically a piece of the file being unzipped into the administrator subdirectory. Depending on whether your installing a component, a module, or a complex plugin with multiple pieces you may need to open up one or more of these directories using the same approach as above. Here is the "blow a big open hole in security" method:
# chmod -R 777 ./administrator/
Or more selectively:
# chmod -R 777 ./administrator/components/
# chmod -R 777 ./administrator/modules/
If you are a linux user then it is very simple to solve. Just type the following command and try again to install plugin/entension.
sudo chmod -R 777 /var/www/html/my_joomla_folder
You can also refer this link for brief information regarding permission of each folder and file.
Cheers!!
In Joomla 3.x you should go to System->System Information to see directory permissions
If one or more directories that are listed are not "writable" then you should change the permission of those directories:
If you are using one of Linux distributions you can use this command
to give the directories read/write/execute permission:
sudo chmod 777 -R address_of_lampp_directory/lampp/htdocs/joomla_directory
I have had a similar issue today and found is was the permissions set on the 'temp folder'. To resolve I changed them to 777 and my plugin installs worked fine!!
Another thing to check is whether you actually have space on the disk. I had this error and discovered that the drive was 100% full. Removing some unused files fixed the problem.
One other thing to try if everything else is not working is to add the following to your .htaccess file:
php_value upload_max_filesize 10M
Make sure 10M covers the size of the file you are uploading - increase it if your file is 12Mb, for instance.
[Source]
This issue was solved like this.
On the configuration.php file change the tmp_path variable according to:
if you site is mysite.azurewebsites.net, the path should looks like
'C:\DWASFiles\Sites\mysite\VirtualDirectory0\site\wwwroot\tmp'
instead of
'C:\DWASFiles\Sites\mysite.azurewebsites.net\VirtualDirectory0\site\wwwroot\tmp'
Refer to the link: http://social.msdn.microsoft.com/Forums/en-US/windowsazurewebsitespreview/thread/2701eadc-9977-46ab-9c56-81a2234bdce4
I did it and every is working for every error problem with OSX, I use OSX version 10.9.2 and get many problems. The way to fix every error is
# cd /Applications
# chmod -R 777 ./XAMPP
some files might not change permission but the problem is gone.
you can create folder and upload fine and picture, including install plugin.