Home » Questions » Computers [ Ask a new question ]

How do I let user 'Y' write in folder 'A' only when executing script 'X'?

How do I let user 'Y' write in folder 'A' only when executing script 'X'?

How do I let user Y write in folder A only when executing script X?

Asked by: Guest | Views: 406
Total answers/comments: 1
bert [Entry]

"How about having script x write to /usr/bin, but as user z which is a user account for this specific purpose?

Granted, this means using the sticky bit, which has its own security concerns, but you can lock down user z (no logins, very restricted permissions beyond /usr/bin, etc.)

I'm not the best on Linux security, but it was the only thing I could come up with on short notice.

A lot of applications execute privilege separation--they do everything they can as an unprivileged user and then the one or two operations that require root are actually done by a separate process. (Alternately: start as root, do the one-two things that require root, and drop privileges.)

Your other option, off the top of my head, is sudo."