Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

What is umask in Linux?
HowToForge ^ | 01 April 2020 | Staff

Posted on 04/01/2020 7:22:22 AM PDT by ShadowAce

click here to read article


Navigation: use the links below to view more comments.
first 1-2021-22 next last

1 posted on 04/01/2020 7:22:22 AM PDT by ShadowAce
[ Post Reply | Private Reply | View Replies]

To: rdb3; JosephW; Only1choice____Freedom; martin_fierro; Still Thinking; zeugma; Vinnie; SW6906; ...

Tech Ping


2 posted on 04/01/2020 7:22:36 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

$su - root
#cd /
#rm -rf *

This corrects everything.


3 posted on 04/01/2020 7:25:22 AM PDT by central_va (I won't be reconstructed and I do not give a damn....)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

I figured a non-virus thread may be good for people.....


4 posted on 04/01/2020 7:33:05 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

UMASK is the Chinese Command to put you MASK BACK ON!...............


5 posted on 04/01/2020 7:35:18 AM PDT by Red Badger (If people were to God like dogs are to people, the world would be a really great place..............)
[ Post Reply | Private Reply | To 1 | View Replies]

To: central_va

#rm -rf *

This corrects everything.

If you first declare * = Pelosi


6 posted on 04/01/2020 7:56:37 AM PDT by Scrambler Bob (This is not /s. It is just as viable as any MSM 'information', maybe more so!)
[ Post Reply | Private Reply | To 3 | View Replies]

To: central_va

“rm -rf *”

I see what you did there...

(Lest someone new to Linux reads this and tries it, that command will wipe your entire drive.)


7 posted on 04/01/2020 8:06:59 AM PDT by PastorBooks
[ Post Reply | Private Reply | To 3 | View Replies]

To: ShadowAce

Thanks, it was nice to have an otcv -other than corona virus- post. I’ve always just created the file then used chmod to change it to whatever I need.


8 posted on 04/01/2020 8:07:41 AM PDT by zadox (Government does not solve problems; it subsidizes them. Reagan)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Red Badger

“UMASK is the Chinese Command to put you MASK BACK ON!...............”

:-)

And ‘cd ~’ means STAY HOME.


9 posted on 04/01/2020 8:09:13 AM PDT by PastorBooks
[ Post Reply | Private Reply | To 5 | View Replies]

To: PastorBooks
And ‘cd ~’ means STAY HOME.

CD ~ CHANGE DIRECTION!..................

10 posted on 04/01/2020 8:16:33 AM PDT by Red Badger (If people were to God like dogs are to people, the world would be a really great place..............)
[ Post Reply | Private Reply | To 9 | View Replies]

To: central_va

Years ago someone in my group did that on one of the machines in our test lab. Fortunately, he worked in another city and was spared physical punishment.


11 posted on 04/01/2020 8:48:28 AM PDT by ken in texas
[ Post Reply | Private Reply | To 3 | View Replies]

To: central_va

Let’s just say, after you do that, you won’t be wasting any more time browsing FR.


12 posted on 04/01/2020 8:58:23 AM PDT by Campion (What part of "shall not be infringed" don't they understand?)
[ Post Reply | Private Reply | To 3 | View Replies]

To: ken in texas

I remember when making daily backups was done to protect against stupidity and not as a defense against nefarious destruction caused by virus attacks or break ins.


13 posted on 04/01/2020 9:00:40 AM PDT by central_va (I won't be reconstructed and I do not give a damn....)
[ Post Reply | Private Reply | To 11 | View Replies]

To: ShadowAce; rdb3; JosephW; Only1choice____Freedom; martin_fierro; Still Thinking; zeugma; Vinnie; ...

ok don’t know how to ping everyone at once- but here3’s a totally off topic question, Just a quick response is fine if anyone knows how to do this- i hope you won’t mind?- it’s firefox related-

When I’ve got several tab open- sometimes I’ll accidentally click/drag on a tab and yank it off the main page so that it’s now in a separate window- a ‘new window’- This is totally annoying- (I have a mouse gesture program that allows me to quickly switch tabs by a mouse gesture- saves a ton of time- but now that the tab is now in it’s own window- i can’t do that)

is there a way to get it back onto the nest of tabs on main window?


14 posted on 04/01/2020 9:30:44 AM PDT by Bob434
[ Post Reply | Private Reply | To 2 | View Replies]

To: central_va

[[$su - root
#cd /
#rm -rf *]]

I did that and now the police are outside the door- what did you do to me?


15 posted on 04/01/2020 9:31:59 AM PDT by Bob434
[ Post Reply | Private Reply | To 3 | View Replies]

To: Bob434
Yes, there is.

WARNING--It's so simple you'll hate yourself...

Drag the new window back onto the tab bar of the original window.

16 posted on 04/01/2020 9:37:18 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 14 | View Replies]

To: central_va

Yup. Fortunately, the machines were all in a test lab for my group, no production stuff, but a couple folks had work interrupted.


17 posted on 04/01/2020 10:26:01 AM PDT by ken in texas
[ Post Reply | Private Reply | To 13 | View Replies]

To: ShadowAce

i tried that- Not working for some reason- i’ll keep trying


18 posted on 04/01/2020 11:12:51 AM PDT by Bob434
[ Post Reply | Private Reply | To 16 | View Replies]

To: ShadowAce

uggh- now it’s working- didn’t work before- Thanks for the suggestion- it’s just one of those little irritating things that drive a person nuts- and i didn’t know how to fix it- Thanks for the solution- i don’t know why it wasn’t working before- I think what i was doing (it was awhile ago) was trying to grab the minimized window onto the open main window (that doesn’t work- just tried it again)- gotta grab open new window tab and drag to open main window-

Thanks again-


19 posted on 04/01/2020 11:16:43 AM PDT by Bob434
[ Post Reply | Private Reply | To 1 | View Replies]

The permissions discussed in the article above aren't the only attributes you can set on a file/directory. There are also extended attributes that give you a little finer-grained control over files. You can even create a file that is immutable even by the root user.

In the following, lines that begin with "$" are the commands entered. Lines beginning with "###" are my comments.

$ id
uid=1000(zeugma) gid=1000(zeugma) groups=1000(zeugma),...
### The username is zeugma, as is the group name
$ touch myfile
### I created 'myfile'
$ ls -l 
total 0
-rw-rw-r-- 1 zeugma zeugma 0 Apr  1 11:36 myfile
### Yup, 'myfile' was created
$ rm myfile 
### I can delete it
$ touch myfile
### Create myfile again
$ ls -l
total 0
-rw-rw-r-- 1 zeugma zeugma 0 Apr  1 11:37 myfile
### Yup. the file was created
$ lsattr myfile 
-------------e-- myfile
### lsattr shows additional file attributes
$ chattr +i myfile
chattr: Operation not permitted while setting flags on myfile
### Ooops. Can't do that as a regular user
$ sudo chattr +i myfile
[sudo] password for amp: 
### Looks like the SuperUser can do it. Adding "i" to a file makes it read-only.
$ lsattr myfile 
----i--------e-- myfile
### now we see the 'i" in it's attributes
$ ls -l 
total 0
-rw-rw-r-- 1 zeugma zeugma 0 Apr  1 11:36 myfile
### looks the same with an 'ls' command though...
$ rm myfile
rm: cannot remove 'myfile': Operation not permitted
### looks like I can't delete it, even though I own it, and the file is "rw"
$ sudo rm myfile
rm: cannot remove 'myfile': Operation not permitted
### Not even SuperUser can remove it!
$ sudo chattr -i myfile 
### Removing the readonly bit
$ rm myfile
### I can now delete the file
$ ls -l
total 0
### Yup it's gone.

20 posted on 04/01/2020 12:18:07 PM PDT by zeugma (I sure wish I lived in a country where the rule of law actually applied to those in power.)
[ Post Reply | Private Reply | To 1 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-22 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson