This is a discussion on Changing File Access Permissions within the Operating Systems forums, part of the Computer Hardware/Software and Networking category; Changing File Access Permissions in UNIX Every file has following attributes: * owner's user ID ( 16 bit integer ) * owner's ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Changing File Access Permissions in UNIX Every file has following attributes: * owner's user ID ( 16 bit integer ) * owner's group ID ( 16 bit integer ) * File access mode word 'r w x -r w x- r w x' (user permission-group permission-others permission) r-read, w-write, x-execute To change the access mode, we use chmod(filename,mode). Example 1: To change mode of myfile to 'rw-rw-r--' (ie. read, write permission for user - read,write permission for group - only read permission for others) we give the args as: chmod(myfile,0664) . Each operation is represented by discrete values 'r' is 4 'w' is 2 'x' is 1 Therefore, for 'rw' the value is 6(4+2). Example 2: To change mode of myfile to 'rwxr--r--' we give the args as: chmod(myfile,0744).
__________________ J.Vijayanand |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing dynamically | vigneshgets | Software Testing | 1 | 11-12-2007 11:30 PM |
| how to access local file from server? | varghese | HTML, CSS and Javascript Coding Techniques | 5 | 10-18-2007 12:15 AM |
| Query about requirements changing | simplesabita | Software Testing | 2 | 08-29-2007 09:58 AM |
| Difference between a file and Random access file Classes | anbuchezhians | Java Programming | 1 | 08-08-2007 02:53 AM |
| Access e-mail using Outlook Web Access | gattuso | Server Management | 0 | 07-19-2007 07:20 AM |