I have a similar configuration with other project, and It run good. But, this project get problem:
Fatal error: Uncaught UnexpectedValueException: The stream or file "/home/docker/test-project/var/logs/prod.log" could not be opened: failed to open stream: Permission denied in /home/docker/test-project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107 Stack trace: #0 /home/docker/test-project/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array) #1 /home/docker/test-project/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php(122): Monolog\Handler\AbstractProcessingHandler->handle(Array) #2 /home/docker/test-project/vendor/monolog/monolog/src/Monolog/Logger.php(336): Monolog\Handler\FingersCrossedHandler->handle(Array) #3 /home/docker/test-project/vendor/monolog/monolog/src/Monolog/Logger.php(643): Monolog\Logger->addRecord(500, 'Uncaught PHP Ex...', Array) #4 /home/docker/test-project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php(89): Monolog\Logger->critical('Uncaught PHP Ex. in /home/docker/test-project/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
I tried: http://symfony.com/doc/current/setup/file_permissions.html and I don't get a good result
Since you have a nginx tag, maybe you are also using nginx as the web server, if so, you might need to do some configuration there:
http://symfony.com/doc/current/setup/web_server_configuration.html#nginx
Your question and setup should be described in your question. If you can edit and update, that would be good.
There is log file permission problem. Docker has not support setfacl with default filesystem driver.
Try this solution as described in symfony documentation:
change the umask so that the cache and log directories are group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the bin/console, web/app.php and web/app_dev.php files:
umask(0000); // This will let the permissions be 0777
The solution was to run this command into project directory:
$ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
Related
I have a problem in the execution of the recursive ldapdelete -r command, when I connect to an ldap virtual machine that I have as root and execute the command ldapdelete -r -h ip -p 389 -D "cn=admin,o=ms,c=fr" -w Ap201 -f /tmp/ldapContextes >> $reportFile 2>> $errorFile, it deletes all the entries in the ldap but if I connect with another bousr user and launch the same command I get the following error : ldapdelete: invalid option -- 'r'
I have thought that it is a problem of permissions for the boeusr user but when entering the binaries I have seen that ldapdelete has execution permissions for root, group and other users which means that boeusr has execution permissions but I don't understand why I get the message of mistake. anyone have any idea?
Thank you.
There is no -r option in ldapdelete, you can't recursively delete entries in ldap with this command.
You have to specify each dn you want to remove one by one, and in the correct order (ie. you can't remove an entry which contains children).
Check the solution I provided to the same kind of question here : How to remove all records from LDAP?
I'm using gitlab on a rasberry pi model 3 B. Following some information about my setup (sudo gitlab-rake gitlab:env:info):
System information
System: Raspbian 8.0
Current User: git
Using RVM: no
Ruby Version: 2.3.6p384
Gem Version: 2.6.13
Bundler Version:1.13.7
Rake Version: 12.3.0
Redis Version: 3.2.11
Git Version: 2.14.3
Sidekiq Version:5.0.5
Go Version: go1.3.3 linux/arm
GitLab information
Version: 10.6.0-rc3
Revision: 52fa89e
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.example.com
HTTP Clone URL: http://gitlab.example.com/some-group/some-project.git
SSH Clone URL: git#gitlab.example.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 6.0.3
Repository storage paths:
- default: /mnt/SeagateExpansion/GitLab/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
After the gitlab update to version 10.6.0 I need to change the url again but when I do the necessary changes in /etc/gitlab/gitlab.rb and run sudo nano gitlab-ctl reconfigure I get the following error messages:
========================================================================
Error executing action `run` on resource 'ruby_block[directory resource:
/mnt/SeagateExpansion/GitLab]'
========================================================================
and
============================================================================
Error executing action `create` on resource
'storage_directory[/mnt/SeagateExpansion/GitLab]'
============================================================================
The result message says:
There was an error running gitlab-ctl reconfigure:
storage_directory[/mnt/SeagateExpansion/GitLab] (gitlab::gitlab-rails line 42) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /mnt/SeagateExpansion/GitLab] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chmod 00700 /mnt/SeagateExpansion/GitLab ----
STDOUT:
STDERR: chmod: changing permissions of ‘/mnt/SeagateExpansion/GitLab’: Operation not permitted
---- End output of chmod 00700 /mnt/SeagateExpansion/GitLab ----
Ran chmod 00700 /mnt/SeagateExpansion/GitLab returned 1
So the problem seems to be, that the execution of the run and create command on the resource storage (GitLab folder on the external HDD [HDD = SeagateExpansion]) expects the permissions to be 700, right?
According to this errors I tried to change the permission of
the external HDD folder /mnt/SeagateExpansion/GitLab see the ls -l output:
drwxrwxrwx 1 root GitLabUser 0 Jan 4 17:55 GitLab
With the help of this post I tried to change the permission with the command:
sudo find /mnt/SeagateExpansion/GitLab -type d -exec chmod 700 {} \;
to the required permission 700. But the changes don't take affect. I also tried chmod -R 700 /mnt/SeagateExpansion/GitLab and executed the commands as root but the changes don't take effect. Even after restarting the raspberry pi. What am I doing wrong?
I also tried to change the options settings/flag of the HDD in /etc/fstab to user but this doesn't help ether.
I'm thankful for every hint and answer :).
Best regards,
Bredjo
I finally figured it out. The solution is to change the mount settings in the /etc/fstab. Because if you have the wrong options settings (see: https://en.wikipedia.org/wiki/Fstab) you are not able to change the permissions because its a ntfs filesystem.
So my old fstab entry was this:
UUID=FE820568820526AD /mnt/SeagateExpansion ntfs defaults,gid=GitLabUser 0 0
And the new entry is this:
UUID=FE820568820526AD /mnt/SeagateExpansion ntfs-3g permissions 0 0
Note that you need to install ntfs-3g to use it in fstab. And the permissions options only comes with ntfs-3g. See: https://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/
After this change I executed again:
sudo gitlab-ctl reconfigure
Now the error disappeared and the permission 700 of the folder /mnt/SeagateExpansion/GitLab could be set. I also noticed that the owner of the GitLab folder was also changed to user git after the reconfiguration:
drwx------ 1 git root 0 Jan 4 17:55 GitLab
That's because I don't need the option gid=GitLabUserany more.
Now everything works again :).
Follow this document http://docs.sulu.io/en/latest/book/getting-started.html at the end of installation process I got this error:
Target: cache
cache:clear ({"--no-optional-warmers":true,"--no-debug":true,"--no-interaction":true})
// Clearing the admin cache for the dev environment with debug true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove directory "/home/vagrant/Code/sulu/var/cache/admin/de~/doctrine": .
sulu:build [-D|--nodeps] [--destroy] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] <command> [<target>]
Before that I was trying to set up file permissions with this:
HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/uploads var/uploads/* web/uploads web/uploads/* var/indexes var/sessions
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/uploads var/uploads/* web/uploads web/uploads/* var/indexes var/sessions
and also had these errors:
setfacl: web/uploads: Operation not supported
setfacl: web/uploads/media: Operation not supported
setfacl: web/uploads/media: Operation not supported
My host OS : Ubuntu 16.04
Vagrant : v.1.9.3
VirtualBox : v.5
Homestead: v.5.2.1
Does anyone have successful installation Sulu CMS with Homestead?
What is the option to solve these my issues?
Sulu CMS looks very promising but unfortunately I could not install it locally still with many attempts.
UPDATE
After comment of Daniel I've tried other way to install Sulu but again got error at the very end of installation:
Executing builders
==================
Target: cache
cache:clear ({"--no-optional-warmers":true,"--no-debug":true,"--no-interaction":true})
// Clearing the admin cache for the dev environment with debug true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove directory "/home/vagrant/Code/sulu/app/cache/admin/de~/annotations": .
Opened test.app in browser I see this error:
Fatal error: Uncaught
Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getLocale() on null in /home/vagrant/Code/sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php on line 70
Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getLocale() on null in /home/vagrant/Code/sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php on line 70
Tried to delete cache folders manually - the same error.
All console commands work fine.
Any ideas?
P.S. I have a good experience of installation other Symfony-based applications under Homestead and all went smooth basically (Sylius, eZ etc.). So I am very surprised....
To get around this, you need to remove this folder from the host machine, because it's an artifact from the previous process of trying to set things up and it's in god-mode, created by a no-longer existing almighty entity.
vagrant destroy (needed to release filesystem locks)
Remove folder on host: rm -rf .../sulu/app/cache/admin
type: nfs on folder binding
vagrant up
Should work then, encountered this same problem recently.
If you're using Homestead Improved, use the built-in "sulu" project type for a decent Nginx auto-setup:
sites:
- map: homestead.app
to: /home/vagrant/Code/Project/web
type: sulu
I'm trying to run CakePHP 2 app inside of a container. I have everything setup and PHP works properly but have one problem: /var/www/app/tmp has incorrect write permissions. This directory is loaded from volume
Did you already take a look at the CakePHP2.0 docs? Maybe this is usefull:
One common issue is that the app/tmp directories and subdirectories must be writable both by the web server and the command line user. On a UNIX system, if your web server user is different from your command line user, you can run the following commands just once in your project to ensure that permissions will be setup properly:
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
setfacl -R -m u:${HTTPDUSER}:rwx app/tmp
setfacl -R -d -m u:${HTTPDUSER}:rwx app/tmp
Source: https://book.cakephp.org/2.0/en/installation.html#permissions
This happens a lot if you're running PHP via a container passthrough. In this scenario, you are passing a directory through to the application with pre-defined permissions. What you'll need to do is periodically make sure permissions are being updated to the webserver from the container. Let's say your container is called web
docker exec web chown -R www-data /var/www/html
(/var/www/html being replaced with wherever your code resides)
For Example. This will make it work perfectly fine in the container, but may actually cause issues accessing the data from the host OS if you're using Linux. I had this issue several times with Laravel and PHP using a volume passthrough from the host, since the volume's files themselves are updated to a userID the host OS doesn't have.
I need to edit the physical_interface_mappings. Per the instructions,this setting is in the file below. However, there is no such linuxbirdege folder in /etc/neutron/plugins/. So where should i edit the physical_interface_mappings?
/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini
If neutron-linuxbridge-agent is already running, run to following command to see what config files were used to start the service.
ps aux | grep neutron-linuxbridge-agent
Else, it might be in /etc/neutron/plugins/ml2/.