Permission problems with Drupal directory - server

I really suck at permissions. I recently installed Drupal on my Ubuntu server and it was working like a charm. Suddenly it got stuck, and I got
There's no internet connection
error on Google Chrome and
Server not found error
on Firefox. However my Apache is still working.
My Drupal is located at /var/www/html/drupal test. However when I type cd drupaltest I got a permission denied error. I changed the permission with:
sudo chmod 660 drupaltest
After that I could get into that directory, but not any directory inside. I am constantly getting permission denied error. I tried adding the -R option, drupaltest/*, and even giving 770. The owner is my current user on the machine, but I still have no idea why I can't access the subdirectories.

Try chown -R owner:group /dirname

Related

Error: EACCES: permission denied, only in VSCode using Remote SSH

I can find plenty of references to this error, but they all point to permission issues, however my permissions appear to be fine as I can modify this folder using nano and SSH.
I'm trying to use RemoteSSH with a custom user account, user
The server is running Debian 11 and nginx
I have key based auth and I connect to the server. When I try to create or remove a file in the web folder (/var/www/html) I get this error message Error: EACCES: permission denied, <what I was trying to do, i.e. rename a file, or delete a file>
I can do all of these things using a standard SSH connection (openSSH built in to Windows 10)
The owner of /var/www/ is set to www-data (recursively)
user is a member of the group www-data
Do I need to do anything in VSCode to update permissions? Am I missing something else?
Here are the exact commands I used:
sudo adduser user www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R 0775 /var/www
OK I did a bit more Googling right after posting this, and I was able to fix this by deleting the .vscode-server folder in the home directory.
https://github.com/microsoft/vscode-remote-release/issues/3399#issuecomment-922935448
I'm not sure if there is an easier way to fix this without doing so, or having to do that every time permissions are changed.

Linphonec on RaspberryPi: how to solve "bctbx-error-bctbx_file_open (Permission denied)"

In my setting I want the user www-data to be able to run linphonec, but there's one error in my way, that I don't know how to handle so far.
When starting linphonec as user www-data:
sudo -u www-data /usr/bin/linphonec
I get the error:
bctbx-error-bctbx_file_open: Error open Permission denied
Where do I have to give permission to user www-data for this to work?
When running it as root there's no problem but I don't want to give www-data root rights.
My setting is:
RaspberryPi 3/4,
with newest Raspian OS,
newest version of "linphonec-cli" installed
raspbi is only accessible in local network and router blocks outgoing calls from it to prevent missuse.
After checking with strace I realized thet the issue must be somewhere else, since I couldn't find a single EACCES error in the strace log.
The root of the error was in my basic configurations file (linphonerc) that I copied over from another existing user. I changed the root_ca directory (after copying the files to the new location and changing rw-rights and ownership). After that linphonec runs without the error when starting with -c parameter and path to linphonerc file.
So the reason was most likely that wrong/unreachable root_ca= configuration.

fail2ban and owncloud.log file

I am using the following configuration, ubuntu 16.04 apache2 php 7.0 owncloud 10.0.3. I think I have made an error when I setup ownclound. The data directory lives in /var/www/owncloud/data ( I believe that owncloud.log resides in this folder). I have deployed fail2ban and the issue that I am having is that fail2ban cannot access the data folder because I ran sudo chown -R www-data:www-data /var/www/owncloud/. The only way I access the log file is through the OWNcloud gui settings > general > log. where I can see the failed login attempts by me. I cannot seem to get Fail2ban to read the owncloud log.
I am new to ubuntu and Owncloud can anyone advise how to rectify this issue, owncloud is working fine and I am using ip addresses to restrict access to owncloud. Fail2ban was supposed to make the server secure so that I could open up owncloud to the internet.
Regards
Steve
You should change the permissions of the log file so that it can be read by everyone but written only by the php process. Do a 'chmod 755 /var/log/owncloud/owncloud.log'
By the way. I suggest that you migrate from Owncloud to Nextcloud. It is a full replacement, fully open source, more features and more secure. And it has a fail2ban equivalent brute force protection already build in :-)

mkdir(): Permission denied in Yii2

After installing yii2, I got the following error.
Some suggests that I should give full permissions to IIS_IUSRS but still to no avail.
You shouldn't need to set the permissions to 777, that is a security problem as it gives read and write access to the world.
It may be that your apache user does not have read/write permissions on the directory.
If you use Ubuntu do this :
Make sure all files are owned by the Apache group and user. In Ubuntu it is the www-data group and user
chown -R www-data:www-data /path/to/webserver/www
Next enabled all members of the www-data group to read and write files
chmod -R g+rw /path/to/webserver/www
The php mkdir() function should now work without returning errors

file/directory permission centos 6.2

On Centos6.2 I am trying to get mod_wsgi (with Django) running. I serve two sites from one directory, and on Centos 5.2 everything works fine. In the logs I got "access denied errors" for the second domain.
To find out were the problem is I created a test directory in the home dir of user A with permission 777, and tried to access this as user B. On Centos 5.2 I can access the test directory, in Centos 6.2 not.
My first thought was that Selinux was active, but Selinux is disabled.
[root#server sysconfig]# sestatus
SELinux status: disabled
Any idea?
New directories in the home directory are created with permission 710. In the old Centos they were created with 711. Changing a directory to 711 does the trick.