0

I have VPS running on Debian 8. I'd like to have 2 folders, one with some files and second one empty. Then, I want to create an FTP user with access to only the empty folder and with the ability to link files (using the ln command) from folder one to that empty folder. I want the user to be able to delete links (only the links, not the actual files) and nothing else. I really did a research and couldn't find a straightforward answer. Can someone please tell me how to do that?

To summarize with example:

I have folders

/home/folder1 and /home/folder2

folder1 contain some files (for example, .ini files)

I want to link all files from folder1 to folder2 and create ftp user that can only access folder2 and can only delete that links and not open/edit or delete actual files, so files are there just for server side usage.

folder1 can contain subfolders with some files that should also be linked in the same subfolders in folder2 (if subfolders don't exist then create them).

  • You want a user who can create/remove links to files, but who cannot read or write the files? Do I understand your problem correctly? – Andy Dalton Feb 20 '18 at 23:12
  • No, i want to create links by myself and let the ftp user to only delete that links, nothing else – Filipovic Luka Feb 20 '18 at 23:17
  • Maybe it'd be better to explain your problem instead of your approach to solving the problem. Maybe there's a more straightforward approach to solving the underlying problem than what you have in mind. Can you edit your original question and explain the problem you want to solve? – Andy Dalton Feb 20 '18 at 23:19
  • I've asked it up in the post, but i'll ask it now shortly. How do i restrict ftp user from opening or editing hard links? So i want them to be able only to delete links (not original files, only links) and nothing else. I really hope you understand now what I want, I know i didn't explained it in the best way. – Filipovic Luka Feb 20 '18 at 23:49
  • If you only wanted to allow FTP users to delete links, then I can think of some possible methods. However, the biggest problem that I see is that FTP doesn't handle creating links; could you use SFTP/SCP instead? – ErikF Feb 21 '18 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.