What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

symbolic link

sabot105mm

Regular Contributor
i would like to make a symlink between 2 HDDs so that both HDDs can be accessed from one folder. one command i know of is for linux
Code:
ln -s /path/to/file /path/to/symlink
will this work?
 
Last edited:
what i found with symlinking 1 folder to a different harddrive is samba doesnt like the idea of symlinking across 2 harddrives at least not using the default samba settings asuswrt uses. windows 7 complains i dont have permission to open the folder/symlink.. any suggestions ?
 
what i found with symlinking 1 folder to a different harddrive is samba doesnt like the idea of symlinking across 2 harddrives at least not using the default samba settings asuswrt uses. windows 7 complains i dont have permission to open the folder/symlink.. any suggestions ?

From what I remember, symlinks are not allowed for security reasons. Otherwise, a user would be able to create a symlink to gain access to portions of the system they weren't allowed - this was a specific security issue that was fixed about two years ago.

I think you can still revert back to the original (non-secure) method through an smb.conf change, but I don't remember what it was. All I can remember is something about "wide links".
 
Code:
# grep -i links /etc/smb.conf
wide links = no

wide links

This option specifies whether the client user can follow symbolic links that point outside the shared directory tree. This includes any files or directories at the other end of the link, as long as the permissions are correct for the user. The default value for this option is yes. Note that this option will not be honored if the follow symlinks options is set to no. Setting this option to no slows smbd considerably because it will have to check each link it encounters.

wide links (S)


This parameter controls whether or not links in the UNIX file system may be followed by the server. Links that point to areas within the directory tree exported by the server are always allowed; this parameter controls access only to areas that are outside the directory tree being exported.

Note: Turning this parameter on when UNIX extensions are enabled will allow UNIX clients to create symbolic links on the share that can point to files or directories outside restricted path exported by the share definition. This can cause access to areas outside of the share. Due to this problem, this parameter will be automatically disabled (with a message in the log file) if the unix extensions option is on.

See the parameter allow insecure wide links if you wish to change this coupling between the two parameters.

Default: wide links = no

Try creating a /jffs/scripts/smb.postconf like this:
Code:
#!/bin/sh

logger -t $(basename $0) $1

CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "wide links = no" "wide links = yes" $CONFIG
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top