Wat houd CHMOD 7777 etc etc in?
Wat is CHMOD? ik zie dat zo vaak voor komen, Kan kan iemand kort en duidelijk uitlegen, Alvast bedankt.
http://www.google.nl
zoeken : CHMOD
greets!
we zijn geen zoekmachines voor je daar hebben ze google voor uitgevonden veel plezier!
misschien zijn er andere gekken die het wel doen voor je maar ik iig niet... kom maar terug als je een serieuze vraag hebt over scripting en php...
zoeken : CHMOD
greets!
we zijn geen zoekmachines voor je daar hebben ze google voor uitgevonden veel plezier!
misschien zijn er andere gekken die het wel doen voor je maar ik iig niet... kom maar terug als je een serieuze vraag hebt over scripting en php...
http://en.wikipedia.org/wiki/Chmod
Je kunt er dus eigenschappen van bestanden mee veranderen. Zo kun je bijv. mappen beveiligen en rechten beheren. 777 zijn volgens mij schrijfrechten... of? Naja weet ik niet zeker, kun je googlen of misschien weet iemand anders dat hier op't forum.
Edit: ik ben gek xD
Je kunt er dus eigenschappen van bestanden mee veranderen. Zo kun je bijv. mappen beveiligen en rechten beheren. 777 zijn volgens mij schrijfrechten... of? Naja weet ik niet zeker, kun je googlen of misschien weet iemand anders dat hier op't forum.
Edit: ik ben gek xD
Gewijzigd op 01/01/1970 01:00:00 door Patrick Niezen
frank is duidelijk niet gek;) thanks frank :P iemand die me steunt :P
berry ik vroeg gewoon netjes, als je niet wilt helpen dan hoef je ook niet, dan hoef je ook niet zulke berichten te plaatsen.
het is een nutteloze vraag in de php script forum... als je zoiets wilt weten heb je op google sneller je antwoord dan hier op dit soort forums. (sorry als ik mijn mening uit) dat mogt tog in nederland? onee... daar knallen ze je tegenwoordig ook al voor overhoop ;)
Bedankt voor jullie hulpen;)
kadir schreef op 27.03.2008 16:30:
Nou, graag gedaan hoor, maar ik verwacht wel dat je de volgende keer toch even Google gaat gebruiken of direct zelf in Wikipedia duikt. Beetje kansloos om hier naar de bekende weg te vragen.Bedankt voor jullie hulpen;)
Succes!
en ik ben dus niet de enigste!
berry schreef op 27.03.2008 16:38:
en ik ben dus niet de enigste!
Ja, alleen Frank geeft een beleefd antwoord en jij niet bepaald.
berry schreef op 27.03.2008 16:38:
en ik ben dus niet de enigste!
SanThe is ook met mij eens;) Let voortaan op voor dat je iets schijft. (als je door leest ik beter, Voor dat je bericht plaast.
Ik ben ook nu even bijdehand.
Lees zelf je berichten ook door, haha.
SanThe is ook met mij eens;) Let voortaan op voor dat je iets schrijft. (als je door leest ik beter, Voor dat je bericht plaast.
"Als je door leest ik beter" ?
Als je het zelf door leest, leest het beter voor mij? zoiets...
[/bijdehand]
CHDMOD:
chmod
From Wikipedia, the free encyclopedia
This article or section includes a list of references or external links, but its sources remain unclear because it lacks in-text citations.
You can improve this article by introducing more precise citations.
The chmod command (abbreviated from change mode) is a shell command in Unix and Unix-like environments. When executed, the command can change file system modes of files and directories. The modes include permissions and special modes.
Contents [hide]
1 History
2 Usage
3 Options
4 String modes
4.1 String mode examples
5 Octal numbers
6 Special modes
7 Examples
8 See also
9 External links
History
A chmod command first appeared in AT&T Unix version 1, and is still used today on Unix-like machines.
Usage
The chmod command options are specified like this:
$ chmod [options] mode file1 ...
To view what the permissions currently are, type:
$ ls -l file
Options
The chmod command has a number of command line options that affect its behavior. The most common options are:
-R: Changes the modes of directories and files recursively
-v: Verbose mode; lists all files as they are being processed
String modes
See also: Symbolic notation of file system permissions
To the chmod utility, all permissions and special modes are represented by its mode parameter. One way to adjust the mode of files or directories is to specify a symbolic mode. The symbolic mode is composed of three components, which are combined to form a single string of text:
$ chmod [references][operator][modes] file1 ...
The references (or classes) are used to distinguish the users to whom the permissions apply. If no references are specified it defaults to "all". They are represented by one or more of the following letters:
Reference Class Description
u user the owner of the file
g group users who are members of the file's group
o others users who are not the owner of the file or members of the group
a all all three of the above, is the same as ugo
The chmod program uses an operator to specify how the modes of a file should be adjusted. The following operators are accepted:
Operator Description
+ adds the specified modes to the specified classes
- removes the specified modes from the specified classes
= the modes specified are to be made the exact modes for the specified classes
The modes indicate which permissions are to be granted or taken away from the specified classes. There are three basic modes which correspond to the basic permissions:
Mode Name Description
r read read a file or list a directory's contents
w write write to a file or directory
x execute execute a file or recurse a directory tree
X special execute which is not a permission in itself but rather can be used instead of x. It applies execute permissions to directories regardless of their current permissions and applies execute permissions to a file which already has at least 1 execute permission bit already set (either user, group or other). It is only really useful when used with '+' and usually in combination with the -R option for giving group or other access to a big directory tree without setting execute permission on normal files (such as text files), which would normally happen if you just used "chmod -R a+rx .", whereas with 'X' you can do "chmod -R a+rX ." instead
s setuid/gid details in Special modes section
t sticky details in Special modes section
The combination of these three components produces a string that is understood by the chmod command. Multiple changes can be specified by separating multiple symbolic modes with commas.
From Wikipedia, the free encyclopedia
This article or section includes a list of references or external links, but its sources remain unclear because it lacks in-text citations.
You can improve this article by introducing more precise citations.
The chmod command (abbreviated from change mode) is a shell command in Unix and Unix-like environments. When executed, the command can change file system modes of files and directories. The modes include permissions and special modes.
Contents [hide]
1 History
2 Usage
3 Options
4 String modes
4.1 String mode examples
5 Octal numbers
6 Special modes
7 Examples
8 See also
9 External links
History
A chmod command first appeared in AT&T Unix version 1, and is still used today on Unix-like machines.
Usage
The chmod command options are specified like this:
$ chmod [options] mode file1 ...
To view what the permissions currently are, type:
$ ls -l file
Options
The chmod command has a number of command line options that affect its behavior. The most common options are:
-R: Changes the modes of directories and files recursively
-v: Verbose mode; lists all files as they are being processed
String modes
See also: Symbolic notation of file system permissions
To the chmod utility, all permissions and special modes are represented by its mode parameter. One way to adjust the mode of files or directories is to specify a symbolic mode. The symbolic mode is composed of three components, which are combined to form a single string of text:
$ chmod [references][operator][modes] file1 ...
The references (or classes) are used to distinguish the users to whom the permissions apply. If no references are specified it defaults to "all". They are represented by one or more of the following letters:
Reference Class Description
u user the owner of the file
g group users who are members of the file's group
o others users who are not the owner of the file or members of the group
a all all three of the above, is the same as ugo
The chmod program uses an operator to specify how the modes of a file should be adjusted. The following operators are accepted:
Operator Description
+ adds the specified modes to the specified classes
- removes the specified modes from the specified classes
= the modes specified are to be made the exact modes for the specified classes
The modes indicate which permissions are to be granted or taken away from the specified classes. There are three basic modes which correspond to the basic permissions:
Mode Name Description
r read read a file or list a directory's contents
w write write to a file or directory
x execute execute a file or recurse a directory tree
X special execute which is not a permission in itself but rather can be used instead of x. It applies execute permissions to directories regardless of their current permissions and applies execute permissions to a file which already has at least 1 execute permission bit already set (either user, group or other). It is only really useful when used with '+' and usually in combination with the -R option for giving group or other access to a big directory tree without setting execute permission on normal files (such as text files), which would normally happen if you just used "chmod -R a+rx .", whereas with 'X' you can do "chmod -R a+rX ." instead
s setuid/gid details in Special modes section
t sticky details in Special modes section
The combination of these three components produces a string that is understood by the chmod command. Multiple changes can be specified by separating multiple symbolic modes with commas.
Edit:
String mode examples
For example, the following command would be used to add the read and write permissions to the user and group classes of a file or directory named sample:
$ chmod ug+rw sample
$ ls -ld sample
drw-rw---- 2 unixguy unixguy 96 Dec 8 12:53 sample
This command removes all permissions, and allows no one to read, write, or execute the file named sample.
$ chmod a-rwx sample
$ ls -l sample
---------- 2 unixguy unixguy 96 Dec 8 12:53 sample
The following command changes the permissions for the user and the group to read and execute only (no write permission) on sample .
Sample file permissions before command
$ ls -ld sample
drw-rw---- 2 unixguy unixguy 96 Dec 8 12:53 sample
$ chmod ug=rx sample
$ ls -ld sample
dr-xr-x--- 2 unixguy unixguy 96 Dec 8 12:53 sample
Octal numbers
See also: Octal notation of file system permissions
The chmod command also accepts three- and four-digit octal numbers representing modes. See the article mentioned above for more information. Using a four-digit octal number to set the modes of a file or directory named sample would look something like this:
$ chmod 0664 sample
Assuming that the setuid, setgid and sticky bits are not set, this is equivalent to:
$ chmod 664 sample
or
$ chmod +r,-x,ug+w sample
For example, the following command would be used to add the read and write permissions to the user and group classes of a file or directory named sample:
$ chmod ug+rw sample
$ ls -ld sample
drw-rw---- 2 unixguy unixguy 96 Dec 8 12:53 sample
This command removes all permissions, and allows no one to read, write, or execute the file named sample.
$ chmod a-rwx sample
$ ls -l sample
---------- 2 unixguy unixguy 96 Dec 8 12:53 sample
The following command changes the permissions for the user and the group to read and execute only (no write permission) on sample .
Sample file permissions before command
$ ls -ld sample
drw-rw---- 2 unixguy unixguy 96 Dec 8 12:53 sample
$ chmod ug=rx sample
$ ls -ld sample
dr-xr-x--- 2 unixguy unixguy 96 Dec 8 12:53 sample
Octal numbers
See also: Octal notation of file system permissions
The chmod command also accepts three- and four-digit octal numbers representing modes. See the article mentioned above for more information. Using a four-digit octal number to set the modes of a file or directory named sample would look something like this:
$ chmod 0664 sample
Assuming that the setuid, setgid and sticky bits are not set, this is equivalent to:
$ chmod 664 sample
or
$ chmod +r,-x,ug+w sample
Edit:
Special modes
See also: Additional file system permissions
The chmod command is also capable of changing the additional permissions or special modes of a file or directory. The symbolic modes use s to represent the setuid and setgid modes, and t to represent the sticky mode. The modes are only applied to the appropriate classes, regardless of whether or not other classes are specified.
Most operating systems support the specification of special modes using octal modes, but some do not. On these systems, only the symbolic modes can be used..
Examples
chmod +r file – read is added for all
chmod -x file – execute permission is removed for all
chmod u=rw,go= file – read and write is set for the owner, all permissions are cleared for the group and others
chmod +rw file – change the permissions of the file file to read and write for all.
chmod -R u+w,go-w docs/ – change the permissions of the directory docs and all its contents to add write access for the user, and deny write access for everybody else.
chmod 0 file – removes all privileges for all
chmod 666 file – sets read and write access for the owner, the group, and all others.
chmod 0755 file – equivalent to u=rwx (4+2+1),go=rx (4+1 & 4+1). The 0 specifies no special modes.
chmod 4755 file – the 4 specifies set user ID.
find path/ -type d -exec chmod a-x {} \; – sets a-x for all directories in tree starting from path/ (use '-type f' to match files only).
find path/ -type d -exec chmod 777 {} \; allows directory browsing ls for example if you've reset permissions for Samba write access.
chmod -R u+rwX,g-rwx,o-rwx <directory> – set a directory tree to rwx for owner directories, rw for owner files, --- for group and all.
chmod -R a-x+X <directory> – remove the execute permission to all files in a directory tree, while allowing for directory browsing.
See also: Additional file system permissions
The chmod command is also capable of changing the additional permissions or special modes of a file or directory. The symbolic modes use s to represent the setuid and setgid modes, and t to represent the sticky mode. The modes are only applied to the appropriate classes, regardless of whether or not other classes are specified.
Most operating systems support the specification of special modes using octal modes, but some do not. On these systems, only the symbolic modes can be used..
Examples
chmod +r file – read is added for all
chmod -x file – execute permission is removed for all
chmod u=rw,go= file – read and write is set for the owner, all permissions are cleared for the group and others
chmod +rw file – change the permissions of the file file to read and write for all.
chmod -R u+w,go-w docs/ – change the permissions of the directory docs and all its contents to add write access for the user, and deny write access for everybody else.
chmod 0 file – removes all privileges for all
chmod 666 file – sets read and write access for the owner, the group, and all others.
chmod 0755 file – equivalent to u=rwx (4+2+1),go=rx (4+1 & 4+1). The 0 specifies no special modes.
chmod 4755 file – the 4 specifies set user ID.
find path/ -type d -exec chmod a-x {} \; – sets a-x for all directories in tree starting from path/ (use '-type f' to match files only).
find path/ -type d -exec chmod 777 {} \; allows directory browsing ls for example if you've reset permissions for Samba write access.
chmod -R u+rwX,g-rwx,o-rwx <directory> – set a directory tree to rwx for owner directories, rw for owner files, --- for group and all.
chmod -R a-x+X <directory> – remove the execute permission to all files in a directory tree, while allowing for directory browsing.
Edit:
See also
File system permissions
chown, the command used to change the owner of a file or directory on Unix-like systems
chgrp, the command used to change the group of a file or directory on Unix-like systems
cacls, a command used on Windows NT and its derivatives to modify the access control lists associated with a file or directory
User ID
Group ID
List of Unix programs
External links
chmod(1): change file modes – FreeBSD General Commands Manual
chmod — manual page from GNU coreutils.
GNU "Setting Permissions" manual
Solaris 9 chmod man page
Mac OS X chmod man page, which also supports access control lists.
CHMOD-Win 3.0 — Freeware Windows' ACL ←→ CHMOD converter.
What CHMOD? File Permissions Calculator, web-based CHMOD calculator.
[hide]
v • d • e
Unix command line programs and builtins (more)
File and file system management cat · chattr · cd · chmod · chown · chgrp · cksum · cmp · cp · du · df · file · fsck · fuser · ln · ls · lsattr · lsof · mkdir · mount · mv · pwd · rm · rmdir · split · touch
Process management at · chroot · crontab · exit · kill · killall · nice · pgrep · pidof · pkill · ps · pstree · sleep · time · top · wait · watch
User management/environment env · finger · id · logname · mesg · passwd · su · sudo · uname · uptime · w · wall · who · whoami · write
Text processing awk · comm · cut · ed · ex · fmt · head · iconv · join · less · more · paste · sed · sort · tac · tail · tr · uniq · wc · xargs
Shell programming alias · basename · echo · expr · false · printf · test · true · unset
Communications inetd · netstat · ping · rlogin · nc · traceroute
Searching find · grep · strings
Miscellaneous banner · bc · cal · dd · lp · man · size · yes
Categories: Unix software | Standard Unix programs
article discussion edit this page history
Log in / create account
navigation
Main Page
Contents
Featured content
Current events
Random article
interaction
About Wikipedia
Community portal
Recent changes
Contact Wikipedia
Donate to Wikipedia
Help
search
toolbox
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Cite this page
languages
Català
Česky
Deutsch
Español
Euskara
Français
Italiano
日本語
Polski
Português
Русский
Slovenščina
Suomi
Svenska
This page was last modified on 5 March 2008, at 11:07. All text is available under the terms of the GNU Free Documentation License. (See Copyrights for details.)
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
Privacy policy About Wikipedia Disclaimers[/quote]
File system permissions
chown, the command used to change the owner of a file or directory on Unix-like systems
chgrp, the command used to change the group of a file or directory on Unix-like systems
cacls, a command used on Windows NT and its derivatives to modify the access control lists associated with a file or directory
User ID
Group ID
List of Unix programs
External links
chmod(1): change file modes – FreeBSD General Commands Manual
chmod — manual page from GNU coreutils.
GNU "Setting Permissions" manual
Solaris 9 chmod man page
Mac OS X chmod man page, which also supports access control lists.
CHMOD-Win 3.0 — Freeware Windows' ACL ←→ CHMOD converter.
What CHMOD? File Permissions Calculator, web-based CHMOD calculator.
[hide]
v • d • e
Unix command line programs and builtins (more)
File and file system management cat · chattr · cd · chmod · chown · chgrp · cksum · cmp · cp · du · df · file · fsck · fuser · ln · ls · lsattr · lsof · mkdir · mount · mv · pwd · rm · rmdir · split · touch
Process management at · chroot · crontab · exit · kill · killall · nice · pgrep · pidof · pkill · ps · pstree · sleep · time · top · wait · watch
User management/environment env · finger · id · logname · mesg · passwd · su · sudo · uname · uptime · w · wall · who · whoami · write
Text processing awk · comm · cut · ed · ex · fmt · head · iconv · join · less · more · paste · sed · sort · tac · tail · tr · uniq · wc · xargs
Shell programming alias · basename · echo · expr · false · printf · test · true · unset
Communications inetd · netstat · ping · rlogin · nc · traceroute
Searching find · grep · strings
Miscellaneous banner · bc · cal · dd · lp · man · size · yes
Categories: Unix software | Standard Unix programs
article discussion edit this page history
Log in / create account
navigation
Main Page
Contents
Featured content
Current events
Random article
interaction
About Wikipedia
Community portal
Recent changes
Contact Wikipedia
Donate to Wikipedia
Help
search
toolbox
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Cite this page
languages
Català
Česky
Deutsch
Español
Euskara
Français
Italiano
日本語
Polski
Português
Русский
Slovenščina
Suomi
Svenska
This page was last modified on 5 March 2008, at 11:07. All text is available under the terms of the GNU Free Documentation License. (See Copyrights for details.)
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
Privacy policy About Wikipedia Disclaimers[/quote]
Gewijzigd op 01/01/1970 01:00:00 door Mitch