Symlink from a virtual server readable to other virtual servers

6 posts / 0 new
Last post
#1 Fri, 06/16/2017 - 04:15
jicao

Symlink from a virtual server readable to other virtual servers

Hello,

We'd like to create an "example" wordpress website with a theme and plugins (that we'd like to upgrade and change sometime). Then we'd like to symlink the theme directory "/home/user/public_html/wp-content/themes/my-theme" to all other "/home/other-user/public_html/wp-content/themes/my-theme" (where "my-theme" would be a symlink) and again with the plugins directory. I tried that but the symlinks are not followed (for security reason for what I read) and wordpress said me that the themes directory is missing. "ERROR: The theme directory "my-theme" does not exist."

Is there a way to do that ? Like if I could say that this new virtual server has a specific group and that specific group has access to that symlink folders ?

Thanks a lot.

Fri, 06/16/2017 - 06:24
adelphia
adelphia's picture

I think you'll need to create a full access SHARED folder on the server. /home/user is a protected folder to either the owner of the account (i.e. user) and thus only they and the admins / root will be able to access that folder. It's the same situation on a Windows PC where you can not access someone else's home / profile directory.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Fri, 06/16/2017 - 10:09 (Reply to #2)
jicao

Thanks.

I'll check that idea ! Looks like it's a good one ;)

Sat, 06/17/2017 - 04:16
unborn
unborn's picture

@jicao

hi, that would be not advised - if the theme or plugin have security hole, all those sites would be affected. what you can do is create folder into normal linux users home and change permissions to access and read for anyone which is dangerous as well. then you need to tell wp, where to look for theme and plugin... you can do that with filezilla, not an complicated setup ;)

im also webdev very familiar with wp, if you fancy some chat regards some tweaks or stuff, drop me an email or join virtualmins irc.

Configuring/troubleshooting Debian servers is always great fun

Sat, 06/17/2017 - 18:29 (Reply to #4)
adelphia
adelphia's picture

Isn't that what I said but in a different way?

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Mon, 06/19/2017 - 03:08
jicao

Hello :)

I Choosed the "/usr/share/shared-wp/themes/my-theme/" with root:root access so it's readonly and I limit the risk, am I right ? I did the same for plugins and I defined "define( 'DISALLOW_FILE_EDIT', true );" in wp-config.php

Do you think I should do anything else ?

Thanks

Topic locked