LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2003, 12:25 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
umask Question


I have a backup drive, and I only want the root account to have access to any files on the backup. The drive mount point is owned by root and has 700 permissions. How can I make sure that all files in the drive are also 700 permissions? I assume that 700 permissions on the drive mount point is sufficient to make sure only root can write to it. Isn't the answer somewhere in umask? I tried man umask, but didn't get any info.
 
Old 07-09-2003, 03:39 PM   #2
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Okay, I found a site where I read up on umask. If I were to put the following command:

umask 077

at the beginning of my backup script, would it then make all my backed-up files have 700 permissions, and then the umask effect would end after the script terminated? Just want to make sure it doesn't last longer than the shell it's used in.
 
Old 07-09-2003, 08:16 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yes, it should work. After the script is done, if you log out and back in, or simply re-source /etc/profile your umask will be re-set back to what you always had.



Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftp umask question bkali4nia Linux - Software 11 12-31-2013 03:59 AM
Umask metallica1973 Linux - Software 4 11-27-2005 02:21 PM
ProFTPD Umask question..... hct224 Linux - Newbie 2 10-21-2003 11:03 AM
umask wbdune Linux - Newbie 5 10-14-2003 02:53 AM
simple umask question danahata Linux - General 8 08-26-2003 12:04 PM


All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration