Question
How do you change File Access Permissions?

Answers

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).   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q The famous Kohinoor diamond was produced from one of the mines in-
  • Q Classify the 'sum'as constants or variables.
  • Q Can logic what it follows?
  • Q      Explain how database system of Drupal works?
  • Q According to Economic Survey for 2015-16 presented by Finance Minister Arun Jaitley, what growth forecast is disclosed in the survey
  • Q What is use of PCK?
  • Q Which unit is used to measure the speed of the ships ?
  • Q What is the english translation or the meaning of the word judo?
  • Q Name some flow measuring devices.
  • Q Can we create an xml document using sax parser?
  • Q What is lempel-ziv-welch (lzw) coding scheme?