Apache2 [Errno 13] Permission denied error - apache2

Within my VirtualHost apache2 config file I have:
<Directory /var/www/antiques/media>
Require all granted
</Directory>
And yet when I'm trying to load an image I'm getting the following error:
[Errno 13] Permission denied: '/var/www/antiques/media/categories'
What am I missing?

If you are not sure how to give permission to file or folder, install FileZilla and connect to your server. Then just go right click on file/folder and find file permissions option. There you can change file/folder permissions much easier.
Define the requirements
Developers need read/write access to files so they can update the website
Developers need read/write/execute on directories so they can browse around
Apache needs read access to files and interpreted scripts
Apache needs read/execute access to serveable directories
Apache needs read/write/execute access to directories for uploaded content
Check out this link for more info about werbserver permissions.

Related

Apache 2 cannot successfully load module?

We have an older ubuntu 14 server that is currently working and has apache2 running on and I'm attempting to install an open idc module to get SSO working at our company. I know...Ubuntu 14 is old, but that's a whole other can of worms...
When I run
apachectl -M
It successfully shows auth_openidc_module (shared)
I also verified that ‘auth_openidc.conf’ is in my /etc/apache2/mods-enabled directory
However when I add
in my apache2.conf :
LoadModule auth_openidc_module module/mod_auth_openidc.so
include mods-enabled/auth_openidc.conf
<Location / >
AuthType openid-connect
Require valid-user
</Location>
and perform a 'apachectl -M' command I get the following error.
'Syntax error on line 57 of /etc/apache2/apache2.conf: Cannot load module/mod_auth_openidc.so into server: /etc/apache2/module/mod_auth_openidc.so: cannot open shared object file: No such file or directory
Action '-M' failed.'
Another point of confusion, I don't see any directory named 'auth_openidc_module' or any .so file anywhere within Apache. I have seen some posts that the .so files might be in '/usr/lib64/httpd/modules' but my lib64 directory is blank...
I'm a newbie to all of this...what am I missing?
So I don't have it working successfully yet, but I did get the error 'can't find' error fixed. The directory for modules on our server was '/usr/lib/apache2/modules/' NOT '/usr/lib64/httpd/modules'

Drupal 7 - can't upload files

I'm getting an error when trying to upload any type of file via Content>Files>Add File. The error reads "The file filename could not be saved. An unknown error has occurred. The file in the Upload a new file field was unable to be uploaded."
I've read through many threads and most seem to indicate a permissions problem. I've checked that all directories are configured properly. Public files are set as sites/default/files; private files are set as sites/default/files/private; and temporary is set as sites/default/files/tmp.
Then I found this error in the server logs:
[Tue Mar 27 10:49:26.932464 2018] [proxy_fcgi:error] [pid 20750:tid 140070898026240] [client nn.nnn.nn.nn:63784] AH01071: Got error 'PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0\n', referer: http://ipaddress.com/file/add
Any ideas what might be wrong here?
Thanks,
CJ
This is definitely a permissions issue.
You mention the path of the different folders (public, private, and tmp), but that is a completely different thing.
What you need to check is that user running the webserver has permissions to write on those aforementioned folders.
Now, you don't mention what server are you using, so I'll assume you're running Apache, and the Apache user and group is called apache in CentOS and www-data in Ubuntu.
You should navigate to those folders (actually to the folder where this folders are placed) and type a ls -la sentence in the terminal, to get a list of permissions for them, as well as the name of the user that owns the folders.
The Apache user needs to access and write in those folders.
I have come across the similar problem once. Solution to this problem is to give the 'write' permission to 'others' as well on tmp directory. You might wonder that this is /tmp directory I am talking about, as while uploading a file it must pass through /tmp directory to the desired location.
So give the write (other) permission to /tmp and sites/default/files/tmp directory. Hope this will help.

Drupal 7 - Views.css and CTools.css not loaded

When using the Views admin panel, it appears completely mispresented. Looking at the files being accessed, it turns out that the needed css files are not loaded. My Drupal installation is within a /drupal/ subfolder, and when the module is trying to access domain.com/sites/all/modules/views/css/views.css a 404 is received.
I tried browsing manually to domain.com/drupal/sites/all/modules/views/css/views.css and it works, therefore the file is there and can be accessed from the web.
The strange thing is that for other folders there is no problem, for example both domain.com/modules/user/user.css and domain.com/drupal/modules/user/user.css work. It seems like a problem with sites/ only...
I do not have CSS optimization enabled, and all folders within sites/ have a 755 permission. Is there some configuration setting I'm missing?
Apparently, the domain I'm concerned about is a parked domain (or whatever this is called) for another one, and contained in a subfolder of public_html. Drupal installation, thus, is a subfolder of that subfolder (say, /home/user/public_html/my_domain/drupal) and all requests for my domain are redirected via an .htaccess and MOD_REWRITE, to the Drupal subfolder. For some reason, it didn't have the sites/ in its regexp (modules/ and themes/ were...).
You may have incorrect vhost configuration. In order to check if this is the reason, try accessing the site without the vhost i.e. localhost/drupal and see if this works.
If it loads correctly, then you need to set up the correct document root:
<VirtualHost *:80>
DocumentRoot /www/drupal
ServerName domain.com
</VirtualHost>
Then restart apache.
For more information about how to set up vhost, visit http://httpd.apache.org/docs/2.2/vhosts/examples.html

why does apache forbid access via symbolic links?

I am trying to install typo3 as per the instructions but I have a bit of a puzzle to solve.
It seems apache denies access to any files I try to access via any symbolic link in the site root directory. I have changed permissions from SymLinksIfOwnerMatch to FollowSymLinks and no joy.
I'm working on mac OSX (SL) and installing in my user's "Sites" directory. I can access any files in this CMS directory via the web browser just not anything through symbolic links.
I hope konsolenfreddy's comment was helpful already. I am trying to round things up here:
First check if the symlinks work from terminal and/or the filesystem in general.
Also, if you use absolute paths, the whole path from root to the file in question must be readable by the Apache user. *
If yes, check if the AllowOverride option is set for your webserver (or if applyable for the virtual host) For debugging you can set AllowOverride All in either apache2.conf, httpd.conf or in sites-available/default
If yes, check if FollowSymlinks is aktivated in any of the files responsible for your webroot, starting with apache2 working yourself down to the .htaccess files.
Try changing file permissions on the symlink file and the target directory (or files)
Try creating your own symlink and see what happens when you call it in the browser.
* Check this answer at askubuntu.com for more hints.
Ok I eventually solved it. In OSX the final file that governs access of sites installed in user directories is the last Include line in the apache2/conf/extra/httpd-userdir.conffile. Once I changed that my problems went away.
Thanks to all the people that replied my questions.

Clearcase CCRC command 'checkin' failed: Unable to create pathname for file

I have CM Server for ClearCase Remote Clients in windows 2003 server.
Installed package in server.
I'm getting below error in CCRC client:
"CRVAP0087E CCRC command "checkin" failed: Unable to create pathname for
file "C:\ccweb\v973012\v973012_Latest_FMC": Permission denied"
Can you please help me to fix this issue?
The most efficient way to troubleshoot right issue is to go directly to the CCRC server, under the CCRC web (snapshot) view and type:
cd c:\ccweb\v973012
cleartool lsview -l -full -pro -cview
That way, you see with which group the user has created the CCRC view in the first place.
That group must be one of the groups associated with the Vob of the element being checked-in.
Check also this technote:
During the installation of Rational ClearCase, you are asked for a temporary directory to use during the installation to unzip large artifacts.
This temporary directory is used to preserve user configuration settings during an update or uninstall process.
If you specify a directory that is mounted on a file system that is separate from the installation directory, the file permissions and owners are not preserved when the files are moved across the file systems.
Finally, check for any trigger set on the Vob: they can have an unwanted side-effect with that CCRC 'checkin' operation.
In the specific case of the OP mth123, he suggests:
Go to the Windows Explorer and try these steps:
Go the the following directory: C:\ccweb
Rename the folder v123412 to V123412 (Only change the first letter and put "V" capitalized.)
Check if the problem is solved.
So depending on the actual tag of the view, this could be an issue about case-sensitive path.
The latest patch caused this issue. While applying patch CC preserving some file inclusing ccweb folder. while restoring those folder during post install these directory might have changed with lowercase/upper case. This is currently with IBM queue.
If you are going to upgrade CCRC please make a copy of ccweb directory with proper ACL or use ccopy.exe (clearcase utility)

Resources