<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: file permissions query in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556359#M39221</link>
    <description>ACLs?? ohk ... thanks for your help. I thought there could be a better way to do it.&lt;BR /&gt;Thanks again.</description>
    <pubDate>Tue, 05 Jan 2010 13:20:53 GMT</pubDate>
    <dc:creator>iinfi1</dc:creator>
    <dc:date>2010-01-05T13:20:53Z</dc:date>
    <item>
      <title>file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556351#M39213</link>
      <description>hi all,&lt;BR /&gt;i need to do a couple of things. &lt;BR /&gt;1)I need all files or folders created in a folder "data" to have group owner as abc.&lt;BR /&gt;2)files created in the directory should have 660 as permission and folders should have 550. Is this possible? i know it is possible if the folders are part of samba and rights need to be assigned to samba users. thru create mask and directory mask. but for unix users is it possible?&lt;BR /&gt;&lt;BR /&gt;i could do achieve the point 1 with &lt;BR /&gt;chgrp abc /data&lt;BR /&gt;chmod g+s /data&lt;BR /&gt;this ensures that all files or folders which are created further in the folder will have the same group owner</description>
      <pubDate>Tue, 29 Dec 2009 18:53:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556351#M39213</guid>
      <dc:creator>iinfi1</dc:creator>
      <dc:date>2009-12-29T18:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556352#M39214</link>
      <description>2)&lt;BR /&gt;Permissions 550 for folders, i.e. dr-xr-x---? In that case, only root can write into those folders, so they won't be very useful for regular users.&lt;BR /&gt;&lt;BR /&gt;Maybe you want 770 for folders instead, i.e. drwxrwx---?&lt;BR /&gt;&lt;BR /&gt;The default permissions for unix users are controlled by a parameter called "umask". Unfortunately, it cannot be set for a directory tree, as the umask value is a property of processes, not directories.&lt;BR /&gt;&lt;BR /&gt;But the designers of most Linux distributions have been clever: usually, each user is assigned his/her own primary group so that nobody else belongs to that group and the group's GID equals the user's UID. This means there is no harm in setting the users' default umask to a value that allows group writes, since the group will usually contain only the user him/herself. Only in directories with "chmod g+s", the group owner gets a different value... which is probably exactly what you want.&lt;BR /&gt;&lt;BR /&gt;To get permission 660 for regular files and 770 for directories, you should set the umask to 007 (in umask, you set the permission bits you wish to always take away). &lt;BR /&gt;&lt;BR /&gt;Just add the command "umask 007" to the end of /etc/profile, then ask your users to logout &amp;amp; log back in and you're done. &lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 29 Dec 2009 19:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556352#M39214</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-12-29T19:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556353#M39215</link>
      <description>&amp;gt;MK: then ask your users to logout &amp;amp; log back in&lt;BR /&gt;&lt;BR /&gt;Or have them execute the "umask 007" command if they have a shell and you don't care if they know.</description>
      <pubDate>Wed, 30 Dec 2009 16:33:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556353#M39215</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-12-30T16:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556354#M39216</link>
      <description>thank you Matti and Dennis.&lt;BR /&gt;i was able to achieve what i needed.&lt;BR /&gt;&lt;BR /&gt;when i add the linux umask 007 in /etc/profile in SLES11 the new files created had the permissions 660 and folders 770. Perfect.&lt;BR /&gt;&lt;BR /&gt;when i tried the same in Cent OS changing anything in /etc/profile didnt work.&lt;BR /&gt;the file /etc/login.defs had the following lines&lt;BR /&gt;# The permission mask is initialized to this value. If not specified,&lt;BR /&gt;# the permission mask will be initialized to 022.&lt;BR /&gt;UMASK           077&lt;BR /&gt;&lt;BR /&gt;still the umask run on command line showed the value 0022&lt;BR /&gt;[u1@localhost ~]$ umask &lt;BR /&gt;0022&lt;BR /&gt;&lt;BR /&gt;i had to add the line in at the end of bashrc.&lt;BR /&gt;umask 007&lt;BR /&gt;&lt;BR /&gt;well this confused me a bit. i read why umask is used frm this link &lt;A href="http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html" target="_blank"&gt;http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html&lt;/A&gt;&lt;BR /&gt;is it that /etc/login.defs and /etc/profile files are not read by CentOS to assign the umask values. or is it that basrc is what controls umask values in CentOS&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2009 10:33:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556354#M39216</guid>
      <dc:creator>iinfi1</dc:creator>
      <dc:date>2009-12-31T10:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556355#M39217</link>
      <description>Bashrc is executed after /etc/profile, so setting the umask there will override all previous settings in /etc/login.defs or /etc/profile.&lt;BR /&gt;&lt;BR /&gt;The logic is as follows:&lt;BR /&gt;First the login process will initialize very basic &amp;amp; safe environment using /etc/login.defs. After that, the user's shell is started. The shell will execute one or more start-up scripts, depending on the type of the user's shell. Any of these scripts may augment or override the previous environment settings.&lt;BR /&gt;&lt;BR /&gt;For the bash shell (the default shell of RHEL and CentOS), see "man bash", chapter "INVOCATION" on what login scripts bash will execute and in which order.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Thu, 31 Dec 2009 14:16:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556355#M39217</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-12-31T14:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556356#M39218</link>
      <description>thank you sir ... wish you a very happy new year :)</description>
      <pubDate>Thu, 31 Dec 2009 20:48:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556356#M39218</guid>
      <dc:creator>iinfi1</dc:creator>
      <dc:date>2009-12-31T20:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556357#M39219</link>
      <description>we i jus thought i got most of the things going when i found there is another issue.&lt;BR /&gt;having a line &lt;BR /&gt;umask 007&lt;BR /&gt;at the end of /etc/bashrc &lt;BR /&gt;results in changing the umask of only those users who ssh into the machine. And not the users who login thru GNOME.&lt;BR /&gt;there is no effect if I add the line 'umask 007' to the /etc/profile or /etc/login.defs.&lt;BR /&gt;&lt;BR /&gt;[arvind@home ~]$ umask &lt;BR /&gt;0022&lt;BR /&gt;&lt;BR /&gt;my actual requirement was to have the 007 umask only in a few mounted drives.&lt;BR /&gt;so i changed the fstab to the following &lt;BR /&gt;&lt;BR /&gt;/dev/vg1/root           /                       ext3    defaults        1 1&lt;BR /&gt;/dev/vg2/data           /data_vms/data                  ext3    umask=007       1 2&lt;BR /&gt;/dev/vg1/arvind         /data_vms/arvind                ext3    defaults       1 2&lt;BR /&gt;&lt;BR /&gt;the umask value in the fstab has no effect, infact it throws an error!&lt;BR /&gt;docs which i went thru showed me umask works for vfat partitions. does it not work for ext3!!&lt;BR /&gt;more docs i go thru i get confused more ... :(</description>
      <pubDate>Sun, 03 Jan 2010 15:50:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556357#M39219</guid>
      <dc:creator>iinfi1</dc:creator>
      <dc:date>2010-01-03T15:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556358#M39220</link>
      <description>Sadly, having different mask requirements for files and directories makes life fairly difficult for most Linux systems.&lt;BR /&gt;&lt;BR /&gt;Given the specific nature of your requirements, you'll probably want to look at mounting the filesystem with ACL support, then using tools to set the default file and directory ownership / permissions, i.e.&lt;BR /&gt;&lt;BR /&gt;getfacl / setfacl</description>
      <pubDate>Tue, 05 Jan 2010 07:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556358#M39220</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2010-01-05T07:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: file permissions query</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556359#M39221</link>
      <description>ACLs?? ohk ... thanks for your help. I thought there could be a better way to do it.&lt;BR /&gt;Thanks again.</description>
      <pubDate>Tue, 05 Jan 2010 13:20:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-permissions-query/m-p/4556359#M39221</guid>
      <dc:creator>iinfi1</dc:creator>
      <dc:date>2010-01-05T13:20:53Z</dc:date>
    </item>
  </channel>
</rss>

