bryanwb / chef-ark

An archive unpacker and installer
59 stars 20 forks source link

Owner of symbolic link should be the same owner of the extracted directory #21

Open khuongdp opened 12 years ago

bryanwb commented 12 years ago

is that possible? every time i create a symbolic link it is owned by root, whether or not

@khuongdb, what OS and distro are you using?

khuongdp commented 12 years ago

Running RHEL 6.2 x86_64. The same here the symbolic link is owned by root. Maybe combine it with lchown

When i run this I expect the link to be owned by 'user1'

ark "app" do url "http://someurl" version "1.0" prefix_root "/pack" home_dir "/pack/default" owner 'user1' action :install end

To solve the problem I just run a ruby_block after this to chown the link.

bryanwb commented 12 years ago

what problem does it cause that the link is owned by root? please help me understand. I don't see the lchown command on my rhel 6.2 system. what package provides it?

khuongdp commented 12 years ago

Sorry my mistake. It should has been chown. I.e. when I what to unpack jboss-4.2.3.GA.tar.gz I want to use this folder structure.

/var/jboss-4.2.3.GA /var/jboss -> /var/jboss-4.2.3.GA

Using:

ark "jboss" do url "http://url/jboss-4.2.3.GA.tar.gz" version "1.0" prefix_root "/var" home_dir "/var/jboss" owner 'jboss' action :install end

The jboss user will own the installation folder /var/jboss-4.2.3.GA. Because other programs is only using the link /var/jboss I want the permission to be the same as the concrete folder so I will not have any permission issue if the owner of the link is the same.