I've read and re-read discussions on the sticky bit - but I still seem to be using it wrong.
I'm managing a server where several team members are working on a project together. Without giving root access to this team members, I'd like to allow them to copy over a directory of files owned by root, permission are 700 on that directory.
our group is "stowdev"
my script is as follows:
Code:
#!/bin/bash
cp -r /path/to/rootowned .
I called it cp_rootowned and set permissions as follows:
Code:
-rwsr-xr-- 1 root stowdev 58 2008-05-01 09:35 cp_rootowned
this doesn't work, it just says permission denied. If I add a whoami to that script it prints my username... I thought that sticky bit meant it would run as root?
Also, once I get the script to copy the files, I'll have to make the files owned by whoever ran the script - any tips?
thx!
Bookmarks