Pergunta

Is there a way to set permissions in a directory such that:

  1. Every user can save files in the directory
  2. Only the directory owner and the file owner can see it

The idea is to allow people to save classified data in a public directory. All users should access the same directory and save files to it, but they shouldn't be alowed to see each other's files. The directory is created in a Linux server, but is accessed in Windows, via Samba. The users only know the basics, so asking them to set permissions on a per-file basis is out of question.

Foi útil?

Solução

As far as I know, unix permissions only allow you to set read, write, and execute bits. If you want to restrict ls permissions for the directory, you have to set them to the directory as a whole. I would rethink the way you're setting this up (possibly one directory per user, with a superuser that has full read privileges for all of these classified document directories).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top