0
The permissions problems are in these folders.
Path "/var/www/hf/app/etc" must be writable.
Path "/var/www/hf/media" must be writable.
Path "/var/www/hf/media/customer" must be writable.
Path "/var/www/hf/media/dhl" must be writable.
Path "/var/www/hf/media/xmlconnect" must be writable.
Path "/var/www/hf/media/xmlconnect/original" must be writable.
Path "/var/www/hf/media/xmlconnect/custom" must be writable.
Path "/var/www/hf/media/xmlconnect/system" must be writable.
Path "/var/www/hf/media/downloadable" must be writable.
However I tried to give the permissions to the folder specified and it is not working...
class magento::magento {
file { "/var/www/magento":
ensure => "present",
owner => "root",
group => "root",
mode => "0644",
source => "puppet:///modules/magento/magento-1.9.1.0.tar.gz",
require => Package["apache2", "mysql-server"],
}
exec { "unzip-magento":
command => "tar -vzxf /var/www/magento",
path => "/bin/",
require => File["/var/www/magento"],
}
exec { "rename-dir-magento":
command => "mv magento/ hf/",
path => "/bin/",
require => Exec["unzip-magento"],
}
exec { "mv-hf":
command => 'mv hf/ /var/www/',
path => "/bin/",
require => Exec["rename-dir-magento"],
timeout => 90000,
logoutput => on_failure,
}
# a fuller example, including permissions and ownership
file { ["/var/www/hf"]:
ensure => "directory",
owner => "root",
group => "root",
mode => "0755",
recurse => "true",
require => Exec["mv-hf"],
}
file { "/var/www/hf/var/":
ensure => "directory",
owner => "root",
group => "root",
mode => "0777",
recurse => "true",
require => Exec["mv-hf"],
}
file { "/var/www/hf/media":
ensure => "directory",
owner => "root",
group => "root",
mode => "0777",
recurse => "true",
require => Exec["mv-hf"],
}
file { "/var/www/hf/media":
ensure => "file",
owner => "root",
group => "root",
mode => "0777",
recurse => "true",
require => Exec["mv-hf"],
}
# permission for media and var directories
file { ["/var/www/hf/var/cache", "/var/www/hf/var/locks", "/var/www/hf/var/package", "/var/www/hf/var/session"]:
ensure => "directory",
owner => "root",
group => "root",
mode => "0667",
recurse => "true",
require => File["/var/www/hf/media", "/var/www/hf/var"],
}
# permission for media and var directories
file { ["/var/www/hf/app/etc"]:
ensure => "directory",
owner => "root",
group => "root",
mode => "0777",
recurse => "true",
require => Exec["mv-hf"],
}
file { ["/var/www/hf/app/etc"]:
ensure => "file",
owner => "root",
group => "root",
mode => "0777",
recurse => "true",
require => Exec["mv-hf"],
}
}
Here is the full code.: git repository. If anyone can help me because in several attempts I can not locate my mistake.
Opa, Rafael Corrêa Gomes. Thanks for the contribution, however, I would not like to see a manual intervention. Because in parallel tests I made ssh the permissions changes and as your examples. It’s OK. But what I’m doing ( was ) is trying to automate the whole process. Since I already have Vms ready for this use. I’m looking to know better in do it myself.
– charles.eduardo