Aliases are not the same as symlinks.
Symlinks just point to a path (relative or absolute).
Aliases first track the file's unique ID and then the path.
Since there are two pieces of information stored in an alias - they are more robust and will follow a file that's moved based on the unique ID. The downside is that the unique ID is based on the file system so copying the file elsewhere mints a new ID so the alias doesn’t map to the new location by design and implementation (currently at least).
Finder (or the very powerful ditto
) are your best bets for moving aliases intact. Worst case you could use disk utility to make an image of a folder that contains everything needed as a subfolder and then move that to preserve the relative locations of the files and isolate the effects of a short name change (/Users/whatever) in case you wish to change that. Once the original mac is disconnected from the new mac - the aliases will reconnect as desired to location of the files on the new mac.
In your configuration, you have unix extensions = no
which is fine, but that is why symbolic links on the server are showing up as folders and not aliases. In this mode the server resolves the symbolic links and the client never sees them. If the client tries to create a symbolic link, the server actually generates an alias file, not a host-OS symbolic link. Reasons for this include security (preventing someone from getting access to /etc/passwd
on the server by creating a symbolic link to it) and client compatibility, as OS X and Windows and Unix have slightly different ideas about what constitutes a symbolic link but they pretty much agree on what is a directory or a file.
Permissions issues with SAMBA are complex, so it's not clear that you do not have a permissions issue. Likewise symbolic like resolving is complex, so it is not clear that what you are doing should, in theory work, and there's always the possibility of a bug (most likely in the SAMBA server).
When accessing a SAMBA server from a Mac, these identities and permissions are involved:
- The Mac User you are logged into the Mac as
- The SAMBA user you are logged into the SAMBA server as
- The SMABA server host OS user you get converted to
- Unix-style file permissions
- For NTFS and HFS+, associated file-system ACLs
So even though you have provided a lot of information, it's still not clear that you are not having permissions problems. The fact that you can mv
and cp
on the server (using what account?) does not mean you do not have a permissions problem preventing you from doing it on the client (using what accounts and with what effective account on the server?).
If the server is supporting ACLs and since you have options like inherit permissions = yes
and inherit acls = yes
set there could be some kind of ACL problem that is only allowing read access to directories accessed via symbolic links. There are several other avenues of investigation based on the server configuration.
I would really expect you should be able to find more information in the SAMBA server logs than you have communicated. They should give you a much better sense of exactly what is being denied.
For what it is worth, I tried to duplicate your setup using an Ubuntu 12.04 host as the SAMBA server and could not reproduce your problem. Symbolic links worked for me as expected.
Best Answer
Simply create a folder action script, move the scpt file to /Users/user_name/Library/Scripts/Folder Action Scripts and apply it to a folder:
The content of the script is:
With Main_Volume_Name: the name of your volume (e.g. Macintosh HD – you don't have to escape spaces!) and user_name: your short user name.
Save the scpt to /Users/user_name/Library/Scripts/Folder Action Scripts/ with the name "alias - add alias instead of moving files.scpt".
Now create a folder "Inspirational" on your desktop and a folder "intermediate" somewhere else.
Right-click the folder "intermediate" and attach the above script to the folder:
Drag both folders to the dock. You may apply convincing icons to be able to tell which is which. If the folder action is activated, applying an icon to the "intermediate" folder will already create a file named _icon alias (or similar) in "Inspirational" folder. Please delete this file. In the example below the rose indicates the "Inspirational" folder and the chalkboard the "intermediate" folder
To create (an) alias(es) in the folder "Inspirational" drag one or several files and/or folders on the "intermediate" folder:
The aliases will be created in the folder "Inspirational" and the dragged files will be moved back to "Downloads":
You can't use only one folder, because this will invoke an endless loop: as soon as a new alias is created by adding a file to the folder action enabled folder, the new alias will be aliased itself too (because it's another "new" file). This would be repeated until your Mac dies!