Current Location: Home> Function Categories> chown

chown

Change file owner
Name:chown
Category:File system
Programming Language:php
One-line Description:Change the file owner.

Definition and usage

chown() function changes the owner of the specified file.

Return TRUE if successful, otherwise return FALSE.

Example

 <?php
chown ( "test.txt" , "charles" )
?>

grammar

 chown ( file , owner )
parameter describe
file Required. Specify documents to be inspected.
owner Specify new owners. It can be the username or the user's ID.

illustrate

Try changing the owner of the file file to user owner (specified by username or user ID). Only the superuser can change the owner of the file.

Similar Functions
  • Change the group to which the file belongs chgrp

    chgrp

    Changethegrouptowhic
  • Copy the file copy

    copy

    Copythefile
  • Read characters from file pointer fgetc

    fgetc

    Readcharactersfromfi
  • Create a hard connection link

    link

    Createahardconnectio
  • Get file information through the opened file pointer fstat

    fstat

    Getfileinformationth
  • Obtain file permissions fileperms

    fileperms

    Obtainfilepermission
  • is_writable alias is_writeable

    is_writeable

    is_writablealias
  • Return the target of the symbolic link readlink

    readlink

    Returnthetargetofthe
Popular Articles