Question

In: Computer Science

You will have to experiment with using chmod on the folder and the file to come...

You will have to experiment with using chmod on the folder and the file to come up with the following:

Find the chmod commands for both the folder and the file that you would use to give the minimum permissions for You (the owner) to be able to edit and change the file (and I don’t want to see 777! ? ) :
___________________________________________________________
___________________________________________________________
___________________________________________________________

Solutions

Expert Solution

Answer

I believe you have some idea about the command chmod. Small recap of permissions.

U G   O
rwx-rwx-rwx

Where
U - Is user/ owner
G - Group

2*2 2*1 1
4 2 1
i.e. 2 exp 0, 2 exp 1, 2 exp 2
In total max what you can have is 4 + 2 + 1 = 7
That means 7 = (Read + Write + Execute)
e.g. chmod 777 means you are granting Read + Write + Execute to Owner, Group and Others

Since you are looking for read and write for the owner - use chmod 644 for files.
However, 644 will NOT work for directory. Directory should have 7 (Read + Write + Execute) for user or the owner but inside the directory, owner can have only read and write permissons on the files. If you provide 644 on the directory, the user/ owner will NOT be able to access the directory as shown below.

Hence for folder/ directory always have 755 set, inside which you can provide 644 for all the files. 644 means Read, Write for user/ owner, Read for Group and Others.

For directory

For files

Summary

For directory use this command - chmod 755 <directory_name>

For files use this command - chmod 644 * , where * indicates all the files residing in that directory


Related Solutions

Part 1 Ask for a file name. The file should exist in the same folder as...
Part 1 Ask for a file name. The file should exist in the same folder as the program. If using input() to receive the file name do not give it a path, just give it a name like “number1.txt” or something similar (without the quotes when you enter the name). Then ask for test scores (0-100) until the user enters a specific value, in this case, -1. Write each value to the file as it has been entered. Make sure...
Discuss the process of folder and file auditing and the benefits thereof.
Discuss the process of folder and file auditing and the benefits thereof.
the assignment folder for this assignment contains a file called values.txt. The first line in the...
the assignment folder for this assignment contains a file called values.txt. The first line in the file contains the total number of integers which comes after it. The length of this file will be the first line plus one lines long. Implement a MinHeap. Your program should read in input from a file, add each value to the MinHeap, then after all items are added, those values are removed from the MinHeap. Create a java class called MinHeap with the...
Before you begin your program: Create a text file in your project folder with 20 "quirky...
Before you begin your program: Create a text file in your project folder with 20 "quirky sayings"/fortunes (the only requirement is that they be appropriate for display in class), In your program you will Create a list by reading those 20 fortunes from your file Ask the user how many fortunes he/she wants to see. store the value in a variable Inside of a loop (loop as many times as the user asked) select a random answer from your list...
1. Using an example that you create (does not have to be based on biology), come...
1. Using an example that you create (does not have to be based on biology), come up with an example of natural selection. Describe your starting population, what conditions must exist in order for natural selection to take place, and then the selection pressure acting on this population as well as the ending population. How does this illustrate the evolution of a population?
This is all in Python. Also, the names come from a .txt file that i have...
This is all in Python. Also, the names come from a .txt file that i have created with 3 names on it(Jim,Pam,Dwight). Main Function. Write a program where the user enters a name. Using the read function, check to see if the name is in the text document. If it is, respond back to the user the name is found within the list. Read Function. The read function should return the contents of the text document as a list. EXAMPLE...
Go to the Files section and download the AFE_Test file from the Datasets folder. We are...
Go to the Files section and download the AFE_Test file from the Datasets folder. We are interested in a one­tail test described in the following fashion: Ho: u < or = to 200 CFM; H1: u > 200 CFM. At 5% significance level, we can reject the null hypothesis given the sample information in AFE_Test1. we can reject the null hypothesis given the sample information in AFE_Test2. we cannot reject the null hypothesis. we can reject the null hypothesis given...
Create a class Student (in the separate c# file but in the project’s source files folder)...
Create a class Student (in the separate c# file but in the project’s source files folder) with those attributes (i.e. instance variables): Student Attribute Data type (student) id String firstName String lastName String courses Array of Course objects Student class must have 2 constructors: one default (without parameters), another with 4 parameters (for setting the instance variables listed in the above table) In addition Student class must have setter and getter methods for the 4 instance variables, and getGPA method...
Using the income statement from Folder Factory Financials Folder Factory Financials , prepare a pro forma...
Using the income statement from Folder Factory Financials Folder Factory Financials , prepare a pro forma income statement for 2016 if the company projects sales to be $60,000 in 2016. Balance Sheet Folder Factory, Inc. December 31, 2014 and 2015 2015 2014 Assets Cash $ 1,000 $     500 Accounts receivable 5,000 4,500 Inventory 7,000 6,000 Total current assets $13,000 $11,000 Gross fixed assets $20,000 $15,000 Less: Accumulated depreciation 10,000     9,000 Net fixed assets $10,000 $ 6,000 Total assets $23,000...
Using python boto3 Check if a folder is in an S3 bucket and if not in...
Using python boto3 Check if a folder is in an S3 bucket and if not in the bucket then it creates a folder in the right directory
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT