Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

fix test site permissions #199

Merged
merged 1 commit into from
Jun 22, 2018
Merged

fix test site permissions #199

merged 1 commit into from
Jun 22, 2018

Conversation

vdloo
Copy link
Member

@vdloo vdloo commented Jun 22, 2018

currently if magento_version is 2, the test site permissions will be
wrong because the chown doesn't resolve the symlink. this causes the
hypernode-importer not to overwrite the index.php file that is placed by
default because it would be owned by root:root.

before:

root@beb7b8-projects-magweb-vgr /data/web/public # ls -strlah
total 149K
 512 drwxrwxr-x 3 app  app     3 Sep  5  2016 ..
 512 -rw-rw-r-- 1 app  app    12 Nov 14  2016 .gitignore
 29K -rw-r--r-- 1 root root  25K Jun 22 15:35 style.css
4.5K -rw-r--r-- 1 root root  757 Jun 22 15:35 opensans.css
 53K -rw-r--r-- 1 root root  95K Jun 22 15:35 jquery.min.js
8.5K -rw-r--r-- 1 root root 8.0K Jun 22 15:35 index.php
 13K -rw-r--r-- 1 root root  29K Jun 22 15:35 bootstrap.min.js
 33K -rw-r--r-- 1 root root  98K Jun 22 15:35 bootstrap.min.css
8.5K drwxrwxr-x 2 app  app     9 Jun 22 15:35 .

after:

app@beb7b8-projects-magweb-vgr:~/public$ ls -stlrah
total 149K
 512 drwxrwxr-x 3 app app    3 Sep  5  2016 ..
 512 -rw-rw-r-- 1 app app   12 Nov 14  2016 .gitignore
4.5K -rw-r--r-- 1 app app  757 Jun 22 15:46 opensans.css
 53K -rw-r--r-- 1 app app  95K Jun 22 15:46 jquery.min.js
8.5K -rw-r--r-- 1 app app 8.0K Jun 22 15:46 index.php
 13K -rw-r--r-- 1 app app  29K Jun 22 15:46 bootstrap.min.js
 33K -rw-r--r-- 1 app app  98K Jun 22 15:46 bootstrap.min.css
8.5K drwxrwxr-x 2 app app    9 Jun 22 15:46 .
 29K -rw-r--r-- 1 app app  25K Jun 22 15:46 style.css

currently if `magento_version` is `2`, the test site permissions will be
wrong because the chown doesn't resolve the symlink. this causes the
hypernode-importer not to overwrite the index.php file that is placed by
default because it would be owned by root:root.

before:
```
root@beb7b8-projects-magweb-vgr /data/web/public # ls -strlah
total 149K
 512 drwxrwxr-x 3 app  app     3 Sep  5  2016 ..
 512 -rw-rw-r-- 1 app  app    12 Nov 14  2016 .gitignore
 29K -rw-r--r-- 1 root root  25K Jun 22 15:35 style.css
4.5K -rw-r--r-- 1 root root  757 Jun 22 15:35 opensans.css
 53K -rw-r--r-- 1 root root  95K Jun 22 15:35 jquery.min.js
8.5K -rw-r--r-- 1 root root 8.0K Jun 22 15:35 index.php
 13K -rw-r--r-- 1 root root  29K Jun 22 15:35 bootstrap.min.js
 33K -rw-r--r-- 1 root root  98K Jun 22 15:35 bootstrap.min.css
8.5K drwxrwxr-x 2 app  app     9 Jun 22 15:35 .
```

after:
```
root@beb7b8-projects-magweb-vgr /data/web/public # ls -stlrah
total 149K
 512 drwxrwxr-x 3 app app    3 Sep  5  2016 ..
 512 -rw-rw-r-- 1 app app   12 Nov 14  2016 .gitignore
 29K -rw-r--r-- 1 app app  25K Jun 22 15:35 style.css
4.5K -rw-r--r-- 1 app app  757 Jun 22 15:35 opensans.css
 53K -rw-r--r-- 1 app app  95K Jun 22 15:35 jquery.min.js
8.5K -rw-r--r-- 1 app app 8.0K Jun 22 15:35 index.php
 13K -rw-r--r-- 1 app app  29K Jun 22 15:35 bootstrap.min.js
 33K -rw-r--r-- 1 app app  98K Jun 22 15:35 bootstrap.min.css
8.5K drwxrwxr-x 2 app app    9 Jun 22 15:35 .
```
@vdloo vdloo force-pushed the fix-test-site-permissions branch from 2ca60ab to 98581cb Compare June 22, 2018 15:50
@vdloo
Copy link
Member Author

vdloo commented Jun 22, 2018

caused the importer to fail copying the index.php in case magento 2 was selected

@vdloo vdloo merged commit 182468a into master Jun 22, 2018
@vdloo vdloo deleted the fix-test-site-permissions branch June 22, 2018 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant