This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Vhosts Directory Permissions for Yeoman
#1
Vhosts Directory Permissions for Yeoman
Im have issues giving permissions for Yeoman to run in the vhosts directories. Always get access denied.

I tried sudo chmod -R 666 /var/zpanel/hostdata/ but now I broke http. Whats the default permissions on the directory?

How can I get Yeoman working for sites in my public_html?

http://yeoman.io/
Reply
Thanks given by:
#2
RE: Vhosts Directory Permissions for Yeoman
Hello compsmith, welcome to the Sentora Forums.

Are you running Yeoman via SSH (most probably you are)?
If yes than you are most likely changing the HostData folder Owner to root (or the user you ran the command).

You will need to change the /var/sentora/hostdata/ (and all subdirectories) back to the apache user:
Code:
#CentOS
chown -R apache:apache /var/sentora/hostdata/
#Ubuntu
chown -R www-data:www-data /var/sentora/hostdata/

After that the permissions are:
- Files: 644 that means files are readable and writeable by the owner of the file and readable by everyone else.
- Directories: 755 is the same thing, it just has the execute bit set for everyone. The execute bit is needed to be able to change into the directory. This is why directories are commonly set to 755.

Regarding the VHosts Directory (/etc/sentora/configs/apache/) the same applies (644 for files and 755 for directories.
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#3
RE: Vhosts Directory Permissions for Yeoman
Take a look on this post: http://forums.sentora.org/showthread.php?tid=895
I think it could help you!
Reply
Thanks given by: apinto
#4
RE: Vhosts Directory Permissions for Yeoman
(05-12-2015, 11:24 PM)tkramer Wrote: Take a look on this post: http://forums.sentora.org/showthread.php?tid=895
I think it could help you!
That was exactly what I told him to do Wink


(05-12-2015, 06:42 PM)apinto Wrote: ...

You will need to change the /var/sentora/hostdata/ (and all subdirectories) back to the apache user:
Code:
#CentOS
chown -R apache:apache /var/sentora/hostdata/
#Ubuntu
chown -R www-data:www-data /var/sentora/hostdata/

..
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#5
RE: Vhosts Directory Permissions for Yeoman
Code:
#CentOS

chown -R apache:apache /var/sentora/hostdata/
#Ubuntu

chown -R www-data:www-data /var/sentora/hostdata/

If the redirection into the hostdata directory, ok! That's right! Should work! ... But if for some folder inside "/ etc /" like webmail or other module, will not work, even giving permission! In this case, as Me.B guidelines, you must create a redirect via .htaccess. as described in the post. Big Grin
Reply
Thanks given by:
#6
RE: Vhosts Directory Permissions for Yeoman
(05-13-2015, 04:10 AM)tkramer Wrote:
Code:
#CentOS

chown -R apache:apache /var/sentora/hostdata/
#Ubuntu

chown -R www-data:www-data /var/sentora/hostdata/

If the redirection into the hostdata directory, ok! That's right! Should work! ... But if for some folder inside "/ etc /" like webmail or other module, will not work, even giving permission! In this case, as Me.B guidelines, you must create a redirect via .htaccess. as described in the post. Big Grin

I dont want to redirect the hostdata directory. I just want to be able to execute yo commands in the public_html directory.

Here is the error its thowing

Code:
[root@panel dev_XXXXXXX_com]# yo

/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:319
     if (this.strict) throw er
                            ^
Error: EACCES, permission denied '/var/sentora/hostdata/zadmin/public_html/dev_XXXXXXXX_com/node_modules'
   at Object.fs.readdirSync (fs.js:666:18)
   at GlobSync._readdir (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:275:41)
   at GlobSync._processReaddir (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:135:22)
   at GlobSync._process (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:130:10)
   at new GlobSync (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:46:10)
   at Function.globSync [as sync] (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:24:10)
   at /usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/index.js:86:26
   at Array.reduce (native)
   at Function.module.exports.sync (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/index.js:85:34)
   at /usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:71:22


I cant access anything past hostdata as root not any sudo users i created
Reply
Thanks given by:
#7
RE: Vhosts Directory Permissions for Yeoman
(05-13-2015, 04:32 AM)compsmith Wrote:
(05-13-2015, 04:10 AM)tkramer Wrote:
Code:
#CentOS

chown -R apache:apache /var/sentora/hostdata/
#Ubuntu

chown -R www-data:www-data /var/sentora/hostdata/

If the redirection into the hostdata directory, ok! That's right! Should work! ... But if for some folder inside "/ etc /" like webmail or other module, will not work, even giving permission! In this case, as Me.B guidelines, you must create a redirect via .htaccess. as described in the post. Big Grin

I dont want to redirect the hostdata directory. I just want to be able to execute yo commands in the public_html directory.

Here is the error its thowing


Code:
[root@panel dev_XXXXXXX_com]# yo

/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:319
     if (this.strict) throw er
                            ^
Error: EACCES, permission denied '/var/sentora/hostdata/zadmin/public_html/dev_XXXXXXXX_com/node_modules'
   at Object.fs.readdirSync (fs.js:666:18)
   at GlobSync._readdir (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:275:41)
   at GlobSync._processReaddir (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:135:22)
   at GlobSync._process (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:130:10)
   at new GlobSync (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:46:10)
   at Function.globSync [as sync] (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/node_modules/glob/sync.js:24:10)
   at /usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/index.js:86:26
   at Array.reduce (native)
   at Function.module.exports.sync (/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/globby/index.js:85:34)
   at /usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:71:22


I cant access anything past hostdata as root not any sudo users i created

Hum, this seems a issue with npm and yo.

Check https://github.com/yeoman/yeoman/issues/1292
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
How to give the cliens file manager access to their respective domain directory vsvinit0 4 10 ,577 10-09-2019, 10:05 PM
Last Post: vsvinit0
Sentora open_basedir - how to set for specific directory sathish2009 6 17 ,374 05-02-2019, 07:35 AM
Last Post: TGates
what files edit /etc/sentora/configs/apache/httpd-vhosts.conf mungujakisa 11 27 ,434 08-21-2018, 10:11 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 3 Guest(s)