Fedora :: Umask, Chown, Chgrp And Other Commands?

Feb 7, 2010

ok 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.

View 8 Replies


ADVERTISEMENT

Fedora :: Chgrp Chown Chmod Resetting After Boot

Aug 30, 2011

I'm trying to make a particular file accessible on my computer ( /dev/uinput ) without having to use sudo or su - I've set up a wiimote to act as a remote for my media player, and it requires access to that file. When I use chmod, chgrp or chown to change the file's settings, it enables access to the file - however, when I reboot my PC, the settings get reset, and I have to change the access rights when I first use it again. I've tried using the following commands to make the changes (substituting my username/groupname as user and group below), as root:

[Code]....

View 2 Replies View Related

Fedora Servers :: Crontab Backup Job Works / But Gives Chown / Chgrp Errors

Jul 3, 2010

As root, I use crontab to run mirrordir to backup directories. Everything gets copied over properly, but owner information isn't preserved and root is the owner of all the backed up files. I can deal with that, but crontab reports tons and tons of chown/chgrp errors for mirrordir every time I do back ups--which is every day--and the multiple emails to root of thousands of chown/chgrp errors is very annoying. The error is "Operation not permitted," but that doesn't make sense to me because the job runs as root (right?) and clearly the job is permitted to create the backup files, so why would it fail to chown and chgrp?

I've had the exact same setup on another server for years, and crontab has always run mirrordir without error. Any suggestions how to clear the errors on my new server?

View 14 Replies View Related

General :: Why Are 'chown' And 'chgrp' Not Working

Feb 12, 2011

I've just installed Ubuntu 10.10 AMD-64 and mounted several partitions into /mnt/ directory. Now I want to be able to perform operations on those partitions without limitations. I'm trying to change the owner and group but it doesn't work. I'm typing sudo chown username filename to perform the operations.

View 1 Replies View Related

General :: Prevent Users From Executing Chown , Chgrp / Chmod?

Dec 8, 2010

In Linux, how do i prevent users from executing chown, chgrp or chmod?

View 2 Replies View Related

General :: Umask And Permissions - Has Umask 007 Bad Side Effects?

Mar 16, 2011

My 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"?

View 1 Replies View Related

General :: Umask And /usr/bin/umask ?

Apr 25, 2011

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...

View 6 Replies View Related

Red Hat / Fedora :: Change Umask Value Permanently ?

Jun 16, 2009

How to change Umask value permanently for all user in Red hat Version

View 1 Replies View Related

Security :: Change Of Umask Values In Fedora 11

Feb 4, 2010

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

General :: Can't Chgrp In NFS4 Mounts

Jun 15, 2010

I'm using Linux in a large multi-user network. Let A be some group which I'm am member of, but which is not my primary group. According to chmod(2) I should be able to chgrp a file to group A. Trying to do so succeeds on a local as well as on a NFSv3 mount, but not on a NFSv4/Kerberos mount (EPERM). Are there any special considerations regarding chgrp when using NFSv4 mounts?

View 1 Replies View Related

General :: Run Chgrp As Root On Ubuntu?

Nov 17, 2010

I need git user to run

chgrp -R www-data linode.git/
chmod -R 770 linode.git/

as root. Only these two commands and only for git user. How can I do that?

View 2 Replies View Related

Ubuntu :: Accidentally Changed CHGRP On User Account / Now Can't Sudo

Mar 10, 2010

I was recently messing around learning chgrp commands, and set my (only) user account to a different group. Now whenever I try to sudo a command, I get 'john is not in the sudoers file. This incident will be reported' message.I *seem* to have a root account (one is listed in System->admin->users and groups), but I'm almost certain that the password for it would be one of 3 things, and it's none of them.

View 2 Replies View Related

General :: Umask Change ?

Jun 7, 2011

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.

View 4 Replies View Related

Security :: Have To Change Umask Value?

Mar 5, 2010

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 Related

OpenSUSE Install :: Where To Set Umask For User

Oct 27, 2010

after 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 ).

View 9 Replies View Related

General :: Changing Default UMASK Value?

Jan 15, 2010

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.

View 1 Replies View Related

General :: Get Umask For All Users Using Script?

Feb 16, 2010

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...

View 5 Replies View Related

General :: Set Default Umask For Users?

Jan 4, 2010

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.

View 1 Replies View Related

Security :: Umask For Cron And Other Log Files?

Mar 16, 2011

Does 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 Related

Software :: Change Umask Of User ?

Jan 7, 2010

I 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 Related

Ubuntu :: Using Chown With Cat?

Jul 21, 2011

I have a list specific list of dirs/files that need to be changed into another users name.I initially thought that this would work:chown -Rc user.name 'cat user.name1.txt' but I get chown: cannot access 'cat user.name1.txt No such file or directory

View 2 Replies View Related

General :: Umask Value In Machine Usually It Shows 0002 - What Is First 0 For

Nov 26, 2009

When 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 Replies View Related

General :: Set Umask To 0000 For A Special User?

Jan 25, 2010

Please see below:

vim ~/.bashrc
umask=0000(bottom line)
source ~/.bashrc

But when I relogin, default umask was still 0022. How could I do ?

View 1 Replies View Related

General :: Umask Change Not Taking Effect

Dec 28, 2009

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.

View 3 Replies View Related

Software :: Umask For Internal-sftp Users?

Dec 9, 2010

How do I set umask for sftp only users ?Users are jailed - that means they use internal-sftp:

Code:
# cat /etc/ssh/sshd_config
..........

[code]...

View 1 Replies View Related

Software :: "chgrp Ksh" Is Working On Ubuntu?

Aug 12, 2010

I just installed ksh and I'm trying to assign it to a particular group, but I can't seem to be able to do it.

If I do:
chgrp privd /usr/bin/ksh
It doesn't change anything.[URL]..

View 6 Replies View Related

OpenSUSE :: Can't Chown Windows In 11.1

Feb 6, 2010

I've got a bit of an issue here. I'm running OpenSUSE 11.1 with an old Windows XP drive slaved on the secondary cable. Works just find, as long as I sudo mount it (sudo mount /dev/sdb1 /windows/C) and I can access everything I have on the drive; this is not the issue. The issue is that I have another drive that I want to sync up. Eh, this needs to be a bit clearer.

When I have /windows/C mounted, it shows a padlock on the C drive, but not windows folder. (/windows/C). I have a dedicated entry in / to allow windows to work. I have maybe 25 folders in my Music folder that I want to sync to my /C drive, as I plan to re-install Suse on a bigger drive, and don't want to lose this music.

Upon su *password* into root, I can ls -l and I get
Code:
ls -l
total 32
drwxr-xr-x 26 root root 32768 1969-12-31 17:00 C

[Code].....

The reason I want to get this stuff transfered over is because I'm running out of room on my smaller drive and I figure I may as well utilize a 200GB HDD for something besides a paperweight. I know this drive will work, but I don't want to lose my current data that exists on my smaller drive. (I think my current drive is a 40? Not completely sure right now)

View 3 Replies View Related

Ubuntu :: Chown And Skip Dot And Dot-dot?

Mar 5, 2011

I issued chown '-hR <user>:<group> *' on a directory. chown also change dot and dot-dot in cwd and all subirectories. How do I go about recursively changing ownership without changing dot and dot-dot?

View 2 Replies View Related

General :: How To Use Chown Command

Jan 12, 2010

My home/container has me as the owner but the contents all belong to root...I've tried >chown cbjhawks /home/cbjhawks but that didn't change anything. Should it be >chown -R cbjhawks /home/cbjhawks? Or what is the proper command for doing this...

View 2 Replies View Related

General :: Apply Umask Settings To An Account That Doesn't Log In?

Aug 4, 2011

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 Related







Copyrights 2005-15 www.BigResource.com, All rights reserved