Creating Symlinks?

Share your awesome tips and tricks here.
mdof2
Posts: 79
youtube meble na wymiar Warszawa
Joined: Mon Nov 18, 2013 6:59 pm

Creating Symlinks?

Post by mdof2 »

I want to create a symlink inside the /web folder to another folder outside of the /home folder.
Is this possible?

When / if I were to browse to my web folder (via http ala Chrome), I want to be able to see / access that symlink (folder). I basically want access to everything in another folder without copying the contents (quite large) to the web folder itself.

Any help or a shove in the right direction would be appreciated.
mdof2
Posts: 79
Joined: Mon Nov 18, 2013 6:59 pm

Re: Creating Symlinks?

Post by mdof2 »

Anyone?
User avatar
clinton.hall
Posts: 846
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: Creating Symlinks?

Post by clinton.hall »

via ssh

Code: Select all

ln -s target link
where target is the file/folder you want linked, and link is the name of the link as you want it shown in the web folder.
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
mdof2
Posts: 79
Joined: Mon Nov 18, 2013 6:59 pm

Re: Creating Symlinks?

Post by mdof2 »

Thank you Clinton.
I got the link, now am having issues with permissions.
From a browser, I get an access denied message.
User avatar
clinton.hall
Posts: 846
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: Creating Symlinks?

Post by clinton.hall »

you need to ensure admin user has permissions for the link and the target

logged in as root,

Code: Select all

chown admin:administrators <link>
chmod 777 <link>
chown -R admin:administrators <target>
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
mdof2
Posts: 79
Joined: Mon Nov 18, 2013 6:59 pm

Re: Creating Symlinks?

Post by mdof2 »

Could I not give my symlink folder the same permissions that the /web folder has?
The permissions the web folder has would be appropriate for the symlink.
User avatar
clinton.hall
Posts: 846
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: Creating Symlinks?

Post by clinton.hall »

yes, use those permissions.
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index