we have a capistrano for our magento application
The deploy are working fine from tools/cap/config/deploy.rb and run correctly each specific env we have like for example tools/cap/config/deploy/production.rb
The problem is that during the deploy process we would like to change the chmod command made by capistrano cause this is getting us some trouble we need to setup manually the rights after each deploy.
We clearly see in the capistrano.log
INFO [db28dba5] Running /usr/bin/env find /var/www/ourwebsite/web/releases/20201117160947 -type f ! -perm 660 -exec chmod 660 {} + as domain#ip
So that chmod 660 must be defined somewhere...but I can't find where.
So I'm looking into a way to "extend" that capistrano behaviour...or at least to add a specific tasks at the end of the current deploy process that will do what we want.
I've seen there was a way to define specific tasks cause we got this in our Capfile
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
But currently we didn't get any of them.
Thanks for your assistance.
Please give full permissions to the root directory of your magento web site. Please give the highest permission (use 777 permission)
Related
when I run command./config.sh --- while trying to setup GitHub runner on server I get this error
An error occurred: Permission to read the directory contents is required for '/var/www/usr/data/actions-runner' and each directory up the hierarchy. Access to the path '/var/www' is denied.
folder /var/www/ is owned by root, and usr running /.configure command has proper rights on /usr/data/action-runner
I tried running above command after adding "usr" to sudo then it tells me command must not run as sudo. So there is no winning here. I personally do not want to run command as sudo so I didn't try to figure out this error.
But, burning question I have is why does this configure script cares if it has read permission on /var/www/
This kind of does not addup
You can run sudo chmod 0755 /var/www, which fixed the problem for me
I am using OpenERP 7.0-20130811-231021 in Ubuntu. I developed a new module but when I try to install it, that module is not in the OpenERP module list. I tried the following steps:
sudo /etc/init.d/openerp start
update modules list
go to installed module and viewed the module.
It is not there when I tried this command:
sudo ./openerp-server -u modulename
It shows the following:
error: [Errno 98] Address already in use
What is causing this error and how can I fix it?
Find openerp-server process id:-
ps -ax | grep openerp-server this will give the process id and need to kill it for example 1234
Kill Process ID:-
sudo kill -9 1234
Start Sever:-
sudo /etc/init.d/openerp-server start
And update module from the GUI, Hope this will help you.
In order to see a custom module in OpenERP 7, it must first be in the addons directory.
Go to Settings > Modules > Update Modules List Click Update You must have Technical Features enabled for the user you are logged in as.
Then go to Settings > Modules > Installed Modules Remove the [Installed] filter and search for your custom module
Custom modules will not appear in Settings > Modules > Apps because that view will only display Modules/Apps that are found online.
You need to check:
1- Your openerp-server.conf in install file, in there you should check that your addons_path reference your module location
2-Check your openerp.py and make shure everything is rigth
3- You must check also your Run Configurations Parameters and specified -u and module name, this will update your module in every restart
How can I direct processes started on remote machines via ssh to run with a certain umask? I want this to apply to commands run as part of standard Capistrano recipes too, so I can't just make an explicit call to "umask" part of the command.
It does not appear that ~/.bash_profile on the remote machine is read, with the way that Capistrano invokes remote commands.
I was confronted to the same issue and got around it by using the then-undocumented SSHKit.config.umask in config/deploy.rb. Note that this will set the umask for every ssh command.
Put umask 0002 in the .bashrc of the user account you use to deploy.
Agreed with Alain--set the umask in your .bashrc instead of .bash_profile. When deploying with Capistrano in a typical setup, your .bash_profile isn't loaded by default. Reading up on the difference between .bashrc and .bash_profile will help in understanding the purposes of the two.
I have environment variables set in my .bashrc file and they are certainly used when I deploy or for running any other commands with capistrano.
Another option is to create a task to set your umask value before you begin creating files on deploy. For example, in Cap 3, you can use this:
task :set_umask do
on roles(:all) do |host|
execute "umask 0002"
end
end
before "deploy:starting", "set_umask"
#beauby's answer using SSHKit is good, but it works only for Capistrano 3 as Capistrano 2 doesn't use SSHKit.
A common problem in relation to umask and Capistrano is that bundle install installs gems with permissions that are too restrictive. For this specific issue, the solution I've found for Capistrano 2 is to say:
namespace :bundle do
task :postinstall do
run "chmod -R u=rwX,go=rX #{bundle_dir}"
end
end
after 'bundle:install', 'bundle:postinstall'
I am front-end developer attempting to crossover into the world of web app development. I've come a long way in learning Javascript, and now I'm looking to toy around with frameworks.
I still have a bit to learn about using the OSX terminal, but I was hoping somebody could help me with this first stumble I'm having....
I try to install meteor using:
$ curl https://install.meteor.com | /bin/sh
Then I get the following:
Meteor 0.6.4 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
cp: /usr/local/bin/meteor: No such file or directory
Couldn't write the launcher script. Please either:
(1) Run the following as root:
cp ~/.meteor/tools/latest/launch-meteor /usr/bin/meteor
(2) Add ~/.meteor to your path, or
(3) Rerun this command to try again.
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
If it's still helpful to anyone, going into /usr/local/bin, running "sudo rm meteor" then running the install gets it to work for me
Yeah try one of the three suggestions or:
sudo curl https://install.meteor.com | /bin/sh
I had the same problem heres how I fixed it!
Delete all meteor folders
In finder (cmd +shft+g)
type in "~/.meteor"
on the top of the finder window where is has the folder.meteor click and drag folder to trash
In finder (cmd +shft+g) type in "/usr/bin/meteor" then drag the meteor folder to trash
3.In /usr/ create a new folder "local" (password required) and inside "local" create a folder "bin"
Go back to terminal a run curl https://install.meteor.com | /bin/sh
I have a problem when i want to install perl module
I make " cpan" to install cpan , but i get this "
Terminal does not support AddHistory.
Your configuration suggests that CPAN.pm should use a working
directory of
/home/cyrine/.cpan
Unfortunately we could not create the lock file
/home/cyrine/.cpan/.lock
due to permission problems.
Please make sure that the configuration variable
$CPAN::Config->{cpan_home}
points to a directory where you can write a .lock file. You can set
this variable in either a CPAN/MyConfig.pm or a CPAN/Config.pm in your
#INC path;
You don't seem to have a user configuration (MyConfig.pm) yet.
i make "y"
then i got this strange message :
mkdir /home/cyrine/.cpan/CPAN: Permission denied at /usr/share/perl/5.10/CPAN/Shell.pm >line 656
Any idea please?
Thank you
The immediate cause of this problem is that you don't have write permissions on /home/cyrine/.cpan. In my experience, this is most often the result of logging in as a normal user, then running cpan for the first time on that account in a su session, causing the CPAN configuration to be created in ~cyrine (because you have cyrine's environment), but owned by root (because su has given you root's permissions). Assuming that is the case, you should be able to resolve this my suing to root, running the command chown -R cyrine.cyrine /home/cyrine/.cpan and then running cpan as user cyrine.