General :: Umask Value In Machine Usually It Shows 0002 - What Is First 0 For
Nov 26, 2009When I see the umask value in a linux machine usually it shows 0002. I understand last three digits (002 in 0002) what is first 0 for?
View 2 RepliesWhen I see the umask value in a linux machine usually it shows 0002. I understand last three digits (002 in 0002) what is first 0 for?
View 2 RepliesMy Debian system has by default umask permissions of 0022, which I never liked. One user can read all the files of another seems very insecure to me.
I am planing to set it to 007, so that user and group have rw but all others have none.
Are there any side effects to that? I have noticed from a trial I did where I was changing permissions on the filesystem that some system stuff in the OS does not work anymore, if "others" have no read permission anymore, so that is why I am asking.
And why are chmod / umask permissions sometimes stated as 4 digits? What is this "all" group in the end? Isn't that already covered by "others"?
Not sure if this is the right place to ask this question. In Solaris we have umask (shell builtin) and /usr/bin/umask. However I could not find /usr/bin/umask in Linux.
I want to know the difference between both and how can we achieve the functionality of /usr/bin/umask in Linux as its not there...
I have logged in with root user
My systems Umask value was 0022.
Code:
So i decided to change it to 0077 and observe the system for some time. so i edited /etc/profile and added
Code:
at the end of file
rebooted the machine.
But the umask is still showing as 0022
After the first attempt is failed I tried changing it using below command.
Code:
Validated it.
Code:
rebooted the machine but the umask is still showing 0022
So at last i have to modify /etc/bashrc file and add umask 077 at the end of the file.
How would i make it in general for all(Even for non-root user) and not just for bash prompt.
I am attempting to modify the default umask value under all accounts on my linux system to 002. This will hopefully allow both the account and the account's group access to the created files.
I have modified it within /etc/bashrc, however it seems to be making no difference on this default value. The files I create through "File Browser" all have the access rights set to 600.
Is there any error here, as all evidence I can find on the internet points to the bashrc file.
I am writing a bash script for auditing a Linux System. One of the points to capture is the umask of the users in the system.
Though a 'umask' command executed by the respective user gives this value, i am not sure how to get this in a script, which would be run with root credentials. This my be pretty easy, but i am not sure how root can find this for say 'user-x' (except say peeking into /etc/bashrc).
umask doesn't seem to accept username argument like the 'id' command does...
I think the following code is trying to change the settings inside the file:
CISum=077
sed -e "s/002/$CISum/" -e "s/022/$CISum/" /etc/bashrc-preCIS > /etc/bashrc
sed -e "s/002/$CISum/" -e "s/022/$CISum/" /etc/csh.cshrc-preCIS > /etc/csh.cshrc
[code].....
But, what if i only want to check what the settings are inside the file, but does not want any changes to the file.
Please see below:
vim ~/.bashrc
umask=0000(bottom line)
source ~/.bashrc
But when I relogin, default umask was still 0022. How could I do ?
I have 2 Oracle users that generate .tmp files under /var/tmp. By default, the files have the permissions 644. Now, a need has arisen whereby the files created by these users have to have the permission bits as 664. Obviously, I changed the UMASK value for these users from 022 to 02. But the files are still getting created with 644 as the permission.
I tried restarting the application as I read that a relogin is required for the UMASK change to take effect. Even that hasn't helped.
On my Ubuntu 11.04x64 server, I have service accounts running which do not log in and do not have home directories. These service accounts are responsible for running processes which are invoked as services.When these services created new files, I need them to be created with the permissions 664 (UMASK 002).I edited the /etc/profile umask setting to reflect this. I see that now my user account creates files which reflect this new umask setting, but the service accounts do not when I manually created files using their accounts (sudo -u serviceaccount touch newfile).
View 1 Replies View RelatedI am trying to set the umask for a process(orkaudio) which is running as the root user.This program creates dir and files and I need the umask to be 022. I have edited my /etc/bashrc -- and when i type in umask i get 0022 --- Not sure how to go about getting this resolved...
View 1 Replies View RelatedI have ext3 partition mounted on /mnt/shared/ as follows
Code:
Permissions above are of the actual mounted fs.
Goal is to have all files created on the fs
1) to belong to group 'users'
2) to have this groups permissions set to rw (rwx for directories) so that all users who belong to group 'users' have full read/write access to data and everyone else to have only read access.
Now because of setgid bit (s) in group permissions every file created has group 'users' and additionally setgid bit is set for directories. Because every users umask by default (on my system) is set to 0022 all created files will have permissions 644 for ordinary files and 755 for directories.
Net result of above means that users A and B who both belong to group 'users' won't be able to modify files created by the other.
So how can I make files created on the fs to be created always with umask 0002 WITHOUT changing default umask for users that is used elsewhere (like in their home directory) ?
I'm struggling to understand an aspect of mounting and mountpoints with /etc/fstab. There is a large number of sites and threads that make recommendations using things like uid, gid, umask, and other options. These methods, however, which I've used, are file-system specific, useful only for filesystems such as (V)FAT and NTFS that allow them.My current situation is that I am mounting partition /dev/sdb5 in, let's call it /media/myMount. My goals:Mount this partition automatically upon boot using /etc/fstab...The partition should be fully accessible only to a specific user or group.What I've done is create the mount point in /media:
If user michapma were to carry out the mount, I believe it would work; however, I want the mount to happen automatically during boot. So, how can I achieve my user (or group) permission goals for this and any other such partitions using fstab?The manpage for mount has been helpful, but after reading many tutorials and forum threads, the only way I know how to do it is to have the user do the mounting or rely on the file-system specific options.
I am using Red Hat Linux 4 .There are some few questions in my mind related to umask. I want to know that is the default file and directory permissions ?
- When we use umask (022) command in terminal. and create a new file then the permissions applied for new file is for that session and when the system will reboot linux will take automatically its default permission from etc/bashrc or /etc/profile ?
- Can we make our own umask or the professional way is to follow 022 only ?
- What is the benefit of umask in Linux?
I'm trying to get a webcam up and running and I'm having a few problems. I'm running OpenSuSe 11.3, gnome and I'm using wxCam to view any webcam output. It's an old webcam, output from lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 03f0:171d Hewlett-Packard Wireless (Bluetooth + WLAN) Interface [Integrated Module]
[Code].....
I thought maybe it needs a driver.
Using YaST
hardware
hardware info
usb
Kernel driver: gspca_pac207 the all knowing google said this driver is found in linux kernels from 2.6.28 release, I have 2.6.34.7
[Code]....
However, in the dialog which shows the connected computers to the account, I found that there are a lot of old computers (previously linked from my home computer, office computer, Virtual Box installations. Hence, I wanted to delete all these computer links and only add my home computer and office computer afresh. Hence I deleted all the computer links and in the end, it shows one "LOCAL MACHINE" entry which does not go away. Now, from my office computer (again Lucid Beta1)
I am able to access the Ubuntu One account and registered my office computer. But in my home computer I am unable to access Ubuntu One. I tried un-installing and then re-installing the Ubuntu One, but still does not work, and stubbornly displays only one entry as "LOCAL MACHINE" and I cannot figure out anyway how to add my home computer to Ubuntu One and access the same Is there some way to completely uninstall Ubuntu One (along with all settings) and then re-install?
How do you transfer files on a Linux machine with ftp,sftp and scp disabled onto a remote machine
View 2 Replies View RelatedI successfully installed the virtual box on my fedora 8 system, and also created a virtual machine with windows xp OS, it works nicely, I try to configure the serial port of my virtual machine and try to configure the path for the port "screen shot are attached" it gives me the error message also the "screen shot are attached" for your review.Is kind of mistake is going on during the path setting, and how to set the path for configuring the serial port of my virtual machine so that I can use the hyper terminal tool of windows.
View 4 Replies View RelatedI have some file tools on a mint machine that I would rather not install on my mac laptop. Mainly because of the vastness of apt-get and the low risk of installation failure. Anyway, every so often I have a file that I want to process in place using some remote tool. Both machines can ssh right in to each other so I was figuring there must be some script or tool out there that would allow me to type out something like remote [file] [tool & args] to send my file to the other machine, get it processed, then get it back.
View 4 Replies View RelatedI'm know very little about Linux but decided to set up a machine running Drupal CMS on a Debian machine and it won't go. The folks at Drupal have tried to help but it seems the Debian OS won't do it's PHP thing for Drupal.
That means i'll have to start at the START I guess.
how to become a master of Linux if one is starting from ABC (I can add and subtract, that's what it feels like)
My connection manager shows wired connections and shows wireless as being disabled. here is some terminal info getting wireless going?
Here is a bunch of things I have tried and the results.
nixon@nixon-desktop:~$ sudo ifup wlan0
Ignoring unknown interface wlan0=wlan0.
nixon@nixon-desktop:~$ sudo ifdown wlan0
ifdown: interface wlan0 not configured
[Code].....
I'm encountering a strange problem. I need to open and forward all UDP and TCP ports related to VoIPtelephony (5000:32000) in the Suse 11.1 server that's acting as router/firewall in our setup. The ports must redirect to a Asterisk server in the local network. (This server has the IP adress 192.168.0.3)I've opened ports in Yast (Firewall>Ports>Advanced) and putted in some masquerading rulesirewall>Masquerading):0/0,192.168.0.3,tcp,5000:31000,5000:310000/0,192.168.0.3,udp,5000:31000,5000:31000when I do a nmap localhost I get:Starting Nmap 4.75 at 2010-01-08 16:52 CETInteresting ports on localhost (127.0.0.1):
Not shown: 991 closed ports
PORT STATE SERVICE
21/tcp open ftp
[code]....
I want to set permissions to a folder as rwx-r-x-r-x in such a way that whenever a new file or folder is created under it, it will automatically inherit the parent folders default permissions.So,what I need to do know, do I have to change the umask value??
View 5 Replies View RelatedI'm the Administrating the computers in my office. I want to monitor the user's activity. How can i remote login without distrubing the user's activity on his computer? Any software need to be installed? (I don't want to use Terminal server client).
View 5 Replies View Relatedafter installing openSuSE 11.3 i was thinking a bit about security. I read, it's a good idea to set umask of users to 077 . I'm unsure now, where to do this, cause there are different locations offered in the web:
/etc/login.defs
$HOME/.profile
/etc/profile - umask would be valid for root too.
And for my understanding:
- Is it wise to set root to umask 077 too or could this lead to negative effects on my system.
- Is it even senseless to umask the normal user to 077 if there is just one desktop-user using my system (myself ).
How to change Umask value permanently for all user in Red hat Version
View 1 Replies View RelatedDoes anyone have a solution for cron file permissions. I need them to be automatically generated 640, right not I believe they are 0644. Could I add a umask varible to the syslog.conf file to set the umask for cron generated files? Or is there a better way to do this. I am speaking only of logs generated by root.
View 1 Replies View RelatedI have a daemon running as a local user account on my red hat box. The problem is the daemon creates directories using a umask of 022. I need group write access to the directories the daemon is creating. I need the daemon to use a umask of 002. I've edited the daemons startup script in /etc/init.d I've changed the umask in the /etc/init.d/functions file. I've added the line "umask 002" in the user's ~/.bashrc and ~/.bash_profile files. I've also setup /etc/bashrc to assign all users a 002 umask (just for kicks)
View 3 Replies View Relatedok so im working on homework and im not understanding what my teacher is wanting me to do and i dont have time to email him seeing as he might not read it until tomorrow. so ill copy and paste and if anyone can better explain it,
2) Use the umask command to change your file creation mask such that,by default for new files and directories you create, no permissions are taken away from the 'user' (owner), write permissions are taken away from the 'group' (group owner), and all permissions (read, write and execute) are taken away from 'other'. Take a screenshot of your terminal window showing the results of this step.
3) Use the touch command to create a new file called testfile. Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.
4) Use the chown command to change the user associated with testfile (the owner) to cint201. Take a screenshot of your terminal window showing the results of this step.
5) Use the chgrp command to change the the group associated with testfile (the group owner) to users. Take a screenshot of your terminal window showing the results of this step.
6) Use the chmod command to change the permissions for testfile such that the 'user' (owner) permissions are set to read, write and execute, the 'group' (group owner) permission are set to read and execute, the 'other' permissions are set to grant neither read, write nor execute, and finally set the SUID bit for the file. Take a screenshot of your terminal window showing the results of this step.
7) Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.
Recently I was going through some chmod manipulations and found the umask values to be 0002 by default in Fedora 11 distro. What I knew about the default values to be 022. I don't know whether this is a kernel modification in this distro or my system is in compromise(I doubt for the latter option, but not confirmed).
View 4 Replies View Related