the ./flow resource:publish command stops with following exception:
Could not publish “/pathTo/htdocs/wbweb/Data/Persistent/Resources/9/d/0/6/9d06ab9ebdb3eaa073d2f01125a632054c86c648” into resource publishing target “localWebDirectoryPersistentResourcesTarget” because the source file could not be symlinked at target location.
The image which fails to link is an automatic generated preview image. If I delete this manually, the publish command terminates with another preview image.
there might be something wrong with either the configuration or the directory structure / file permissions in your setup.
Just a little reminder about what Neos tries to do: Neos keeps all your uploaded and generated images and other assets in a non-public directory (called “storage”, by default in Data/Persistent/Resources/) and publishes any of them – when it is supposed to be public – to the “target” directory (by default Web/_Resources/Persistent/). In order to save space and speed things up, Neos can also create symlinks from the target directory to the storage.
So, in your case, Neos should create a symlink “/pathTo/htdocs/wbweb/Web/_Resources/Persistent//pathTo/htdocs/wbweb/Data/Persistent/Resources/9d06ab9ebdb3eaa073d2f01125a632054c86c648/somefilename.png” which points to “/pathTo/htdocs/wbweb/Data/Persistent/Resources/9/d/0/6/9d06ab9ebdb3eaa073d2f01125a632054c86c648”.
First thing you may want to do is figuring out where Neos wants to create the symlink:
./flow configuration:show --type Settings |grep -A 9 localWebDirectoryPersistentResourcesTarget
This should tell you, which settings are actually active and which directory Neos tries to use. Next you should check if you can manually create such a symlink being the same user like the webserver (e.g. www or the like).
Hope that helps,
Hello Robert, It seems to me that the problem occurs if the mysql:typo3_flow_resource_resource/filename column contains more than 126 chars. If I shorten the filename manually the linking via resource:publish works. On the system level linking via ln -s … … has no limitations, it works also with the filename > 126 chars. Sorry, my NEOS is not the newest one but I can not update it because of 3rdParty plugins. Is it possible that it has to do with php.ini settings? Thanks, Tom
this error occurs because the linker uses absolute paths and exceeds the maximum file name length of linux, which is 255 on my file system. The place whre my neos lives is deep nested and so the path becomes very long.
I think this is fixed in newer NEOS versions, they are using relative paths. I’ll quickfix it linking the resources in a more flat folder structure,
that was not the reason. My home where NEOS lives is an eCryptfs with ~140 characters max file name length. So some preview images exceed this length.