This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / PLS: what's the diff between chmod 770 & chmod 2770? when to use chmod 2770? Any special permission tips to share? THX
-bentley(小兔);
2008-9-11
(#4680567@0)
-
it's setuid, let you run the application as different user.
-holdon(again);
2008-9-11
(#4681983@0)
-
It is setgid not setuidlet you run the application as different GROUP.
-diresu(makeITwork);
2008-9-12
{47}
(#4683137@0)
-
I've found a scenario. Any comments are welcomedI've found a scenario. Any comments are welcomed
app-server running as asprocusr:asprocgrp; it writes logs to /appcode/logs owned by appusr:appgrp;
asprocusr is in appgrp; appusr isn't in asprocgrp;
chmod 2770 /appcode/logs allowes app-server create logs as asprocusr:appgrp ( instead of asprocgrp ) which is changable by appgrp members;
chmod 770 only allowes app-server logs as asprocusr:asprocgrp, unaccessiable by appgrp
-bentley(小兔);
2008-9-12
{431}
(#4683357@0)
-
Don't quite understand your question.SUID/SGID has only effect on executable files. I assume the file named logs would imply it is a text file. Set SGID bit to it will not have any effect.
-diresu(makeITwork);
2008-9-12
{151}
(#4683504@0)
-
yes, you are right.
-holdon(again);
2008-9-12
(#4683393@0)