On Thu, 04 Feb 2016, Rolf-Werner Eilert wrote: > Hi folks, I stumbled over this one: > > The help page about File Mode Syntax (for Chmod and Chgrp) says that > file mode has to be a string with 9 characters. The table lists them. > > I can leave out or taint random positions by unknown characters... but > it does not say which of the given characters are interpreted if I leave > out some of them. > > If I write "rwx", is this 1,2,3 (user)? And "rwx...r--" or "rwx###r--" > would mean "rwx for user, no change in group, and read-only for others? > > And I cannot simply set "660", right? > > Thanks for your insight... >
I can't tell you what is the intended behaviour but the attached project
shows that:
- "rwx" alone sets the owner bits, i.e. the first block,
- "r+-*/x--" sets owner's "r" and group's "x" and leaves owner's "w" and
group's "r" unchanged (the "+" and "/" characters) and resets everything
else because these have a "-",
- "rrr" only sets the owner's "r",
- octal modes such as "660" do not work.
Included is also a function which converts a string of three octals into the
Chmod mode syntax.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
chmod-test-0.0.1.tar.gz
Description: Binary data
------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
