/ Linux Permissions and Groups Real Usecase for Group Access - rtt - IT Resource

Linux Permissions and Groups Real Usecase for Group Access

I have a directory structure which the primary user needs full access on but wanted a user to access only a specific directory within the main directory (so they could write in there only and nowhere else).

Here's what I did:

[root@compevo8001 dllnow]# ls -alh

drwxrwxr-x  2 someuser software  4.0K Oct 19  2017 ExpireYMD-2017-11-20
drwxrwxr-x  2 someuser software  4.0K Nov 19  2017 ExpireYMD-2017-12-20
drwxrwxr-x  2 someuser software  4.0K Dec 19  2017 ExpireYMD-2018-01-20
drwxrwxr-x  2 someuser software  4.0K Jan 19  2018 ExpireYMD-2018-02-20
drwxrwxr-x  2 someuser software  4.0K Feb 19  2018 ExpireYMD-2018-03-20
drwxrwxr-x  2 someuser software  4.0K Mar 19  2018 ExpireYMD-2018-04-20
drwxrwxr-x  2 someuser software  4.0K Apr 19  2018 ExpireYMD-2018-05-20
drwxrwxr-x  2 someuser software  4.0K May 19 04:24 ExpireYMD-2018-06-20
drwxrwxr-x  2 someuser software  4.0K Jun 19 03:49 ExpireYMD-2018-07-20
-rwxr-xr-x  1 someuser software  688 Mar 18  2008 symlinkmodify.sh
-rwxr-xr-x  1 someuser someuser  688 Mar 18  2008 symlinkmodify.sh

[root@compevo8001 httpdocs]# groupadd software
[root@compevo8001 httpdocs]# useradd softwareuser -g software

[root@compevo8001 httpdocs]# chown -R someuser.software membersonly/dllnow/


So basically "softwareuser" who is part of the "software" group can only write to "dllnow" and cannot write anywhere else based on their group permissions.


Tags:

linux, permissions, groups, usecase, accessi, directory, primary, user, compevo, dllnow, ls, alh, drwxrwxr, someuser, software, oct, expireymd, nov, dec, feb, mar, apr, jun, rwxr, xr, symlinkmodify, sh, httpdocs, groupadd, useradd, softwareuser, chown, membersonly, quot,

Latest Articles

  • How Does Cisco CUCM (Cisco Unified Communication Manager) Work?
  • What DNS Options Does Active Directory Offer in Windows Server 2008,2012,2016 ?
  • syntax error, unexpected T_SL in PHP Solution
  • grep regular expression match number range between specific numbers
  • bash how to print out lines of text within a range from the first occurrence
  • bash script how to to check LAN computers for open ports
  • MySQL Using mytop Debug Source of High IO and Slow Performance
  • How To Mathematically Convert and Calculate Binary Value To Decimal Value
  • systemd management using systemctl and journalctl to check systemd logs
  • css how to format code in the code tag
  • css br with extra blank line
  • What is /dev/pts and why do we need it in Linux?
  • Linux What is umask (user mask) for file and directory creation permissions and how to calculate umask and change the defaults
  • Linux Permissions and Groups Real Usecase for Group Access
  • Centos 7 python34 how to install the gi library
  • Centos 7 - Convert Minimal to Graphical GUI GNOME or KDE Desktop
  • AMD Set Fan Speed and Other Powerplay Memory/CPU Timings with a Linux script
  • Ethereum Mining Claymore Nanopool Error
  • genisoimage errors with long filenames and deep directory structures
  • Linux Kernel USB Export Errors