Question

1. the commands you used to create the directories and files in Linux and Windows; 2....

1. the commands you used to create the directories and files in Linux and Windows;

2. the commands you used to determine default permissions in Linux and Windows;

3. the commands you used to change permissions on your files in Linux and Windows;

4. a paragraph about how directories and file permissions work and what was the same or different between Windows and Linux.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

create directory command both in windows and linux mkdir <directory_name>
create file command in  linux touch <file.txt>
create file command in windows is echo This is a simple test text file > simple.txt
This creates a file named simple.txt

2.

The command in unix is umask. In my system it gives
$ umask
0022
It is represented in octal value , First 0 indicates it is octal. Hence the value is actually 022

The list of Octal umask permission values are as below
Octal value : Permission
0 : read, write and execute
1 : read and write
2 : read and execute
3 : read only
4 : write and execute
5 : write only
6 : execute only
7 : no permissions

considering above table of permission value the umask
Bit who File permission
0 Owner read, write and execute
7 Group No permissions
7 Others No permissions
So when my umask returns 022 it indicates
owner can read,write and execute the file
users of the same group can read and execute the file
Others can read and execute the file .
So by umask 022, the user can write data, but anyone can read data.

In windows it is
c:/>windows whoami /priv

3.

In linux
chmod options <filename>  
options can have following values

Number Permission Symbol
------------------------------
0 No Permission ---
1 Execute --x
2 Write -w-
3 Execute + Write -wx
4 Read r--
5 Read + Execute r-x
6 Read +Write rw-
7 Read + write + execute rwx

$ chmod 774 myfile.txt
Here the digits 7, 7, and 4 represent the permissions for the user, group, and others.

In linux apply following command

$ ls -l a.txt
-rw-r--r-- 1 apple staff 0 Feb 28 18:33 a.txt

In windows NTFS, the file/folder permission can be set from the properties context window of the file/folder as below


4.

Meaning of file/folder permissions

See the command
$ ls -l a.txt
-rw-r--r-- 1 apple staff 0 Feb 28 18:33 a.txt

The first column of the above list shows the detail of file permission. The first character '-' indicates it is a file. For directory it starts with 'd' for example as below

drwxr-xr-x 2 apple staff 64 Feb 28 18:53 test


r - It stands for Read permission. Whether the file may be read. If it is a directory, this permission allows to list the contents of the directory.

w - It stands for Write permission. With ths permission, a file may be written to or modified. For a directory, it indicates whether you can make change the content of directory like delete, rename or create a file/folder.

x - It stands for Execute permission. Whether the file may be executed. For a directory, this attribute decides whether an user has the permission to enter, run a search through that directory or execute programs from this directory.

The Linux file system is derived from Unix, which is much older than Windows. Hence the implementation of file permission in linux and windows are different, though conceptually they handle the same set of file management scenarios.

Each file could have three sets of permissions – access permissions for everyone, access permissions for its 'owning group', and access permission for its owning user. These three permissions are either Read, Write, or Execute.

When a new user is created, who needs write access to the file, if a new user joins in some other department and , he is not in the owning group of the file, it is needed to create a new group that comprises both this new user and the previous department, and replace the 'Owning Group' with the new group. For larger organizations, these permissions become messey as new user joins.

However, the Windows file system, every file can have permissions assigned to it, for any number of users, any number of groups, or “Everyone”. There are even several different definitions of “Everyone” – authenticated users, network users, guests, system users and so on. At the folder level, these fine-grained permissions can be set even for inheritance by subfolders and their nested sub folders, so that any changes at the parent folder will be replicated to its child subfolders automatically.

Add a comment
Know the answer?
Add Answer to:
1. the commands you used to create the directories and files in Linux and Windows; 2....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 5.Create two files also called file file1 and file2 in testdir_2 Use the ls -lR to show you created the directories 6. Change the permission of the files in the directories below and show their permi...

    5.Create two files also called file file1 and file2 in testdir_2 Use the ls -lR to show you created the directories 6. Change the permission of the files in the directories below and show their permissions testdir/testdir_1/file1 where owner has read and execute permissions testdir/testdir_1/file2 where where owner has read, write and execute permissions. Group has read only permissions 7. Create a directory called newdir/newdir_1/newdir_2 copy the file testdir/testdir_1/file1 to this directory Change the permisions of the file to owner,...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • Using only shell commands, create a directory structure in your Linux file system to organize files...

    Using only shell commands, create a directory structure in your Linux file system to organize files for this course. An example structure may look like the following: osweb homework homework1.c homework2.java homework3.cpp labs lab1 setup.txt projects Include the following by only using shell commands: List the contents of a directory Write data to a text file Print the contents of a text file to the terminal Delete a text file Move a text file to a different directory Rename a...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • I'm stuck, if you can provide the code I can put it into the BASH environment...

    I'm stuck, if you can provide the code I can put it into the BASH environment Executing tasks: In this section of the project, you will demonstrate your ability to execute Linux commands to create files and create and organize the Linux directory structure. At the end of this section, you will create a log file that will include a list of all the commands you used to complete these steps. VII. In the workspace directory, create new directories titled...

  • Starting from the Linux default permission for file and directories, what umask would you use to...

    Starting from the Linux default permission for file and directories, what umask would you use to ensure that for all new files, the owner would have read and execute; members of the group would have read, write and execute; and others would have execute?

  • COSC 3411 /ITAP 3411 Homework (UNIX Shell Commands) How would you ensure that all ordinary files...

    COSC 3411 /ITAP 3411 Homework (UNIX Shell Commands) How would you ensure that all ordinary files created by you have rw-rw---- as default permissions? How would you sort in the background a file called "bad.txt", and place the results in a file called "sort.txt"? Archive the contents of your home directory (including any subdirectories) using tar. Compress the tar archive with gzip. Now extract their contents. Use the “find” command to locate in /docs and /usr/docs all files that Begin...

  • Unix/Linux The purpose of this lab is to practice the commands to manage and organize files...

    Unix/Linux The purpose of this lab is to practice the commands to manage and organize files and directories: How would one go about this? Thanks. Task 1: Preliminaries: 1) If you have not already done so, create a directory called bin under your HOME directory. 2) If you have not already made a copy (using ftp) of the file called famous.dat from the Assignment#1, do that now. 3) Make bin the active/working directory. Task 2: Perform all of the following...

  • Please write the Linux commands and run them. h. What is the command or commands that...

    Please write the Linux commands and run them. h. What is the command or commands that would list the contents of the /var/log directory in alphanumeric order? List the command and its output. i. What is the command or commands used to list the files in /var/log in order of their size? List the command and its output. j. What is the command or commands used to list the top 10 file who use the most disk space? What is...

  • Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning....

    Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning. Use 'whatis' or 'man' command to find out about each command. Your document should include the description or screen shots of the output from each of the command. Commands: df du gzip file history wget Changing access rights: chmod u+x Dir1.0            adds execute permission for the owner chmod go-w file1              removes write permission for the group and others chmod ugo=rw testfile     sets...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT