Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › [Solved] Giving a group full access while all others are denied....
New Posts  All Forums:Forum Nav:

[Solved] Giving a group full access while all others are denied....

post #1 of 5
Thread Starter 
Doing a project for class, and im stuck on a pretty simple task. I need to take a folder and give it full access while denying all others.

Here is what I got.

Groups:
marketing
finance

Folders: (path is /storage/foldername)
campaigns
financials
public


Here is what I need:

campaigns - Marketing needs full access while all others are denied
financials - finance needs full access while all others are denied
public - finance needs full access while all others are read only.

Looking through my textbook and the internet, im not finding out how exactly I let the folder know which group goes to the folder. I see that doing chmod g+w,o-r does similar, but where in this syntax is it telling the groupname? I must be thinking something wrong here..

A lil help?
Hades
(19 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 7700K ASRock Z270 Gaming K6 EVGA GeForce GTX 980 SC G.SKILL Ripjaws V Series 32GB (2x16GB) 
Hard DriveHard DriveHard DriveCooling
Western Digital Blue 1TB Samsung 850 PRO Western Digital Black 1TB NZXT Kraken X61 
OSMonitorMonitorMonitor
Windows 10 Pro Asus VG248QE Samsung Syncmaster 2494 LG LF5600 42-Inch 1080p LED TV 
KeyboardPowerCaseMouse
Logitech G710 Seasonic Platinum 660XP 660W NZXT H440 Logitech G502 Proteus Core 
Mouse PadAudioAudio
Glorious Extended Gaming Mouse Mat Klipsch Promedia 2.1 Sennheiser HD 558 
CPUGraphicsRAMHard Drive
Quad core Krait 450 CPU 2.7GHz (Qualcomm Snapdr... Adreno 420 GPU 3GB RAM 32GB 
OSMonitor
Android Lollipop 5.0.1 6" 1440x2560 display (493 ppi) 
  hide details  
Reply
Hades
(19 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 7700K ASRock Z270 Gaming K6 EVGA GeForce GTX 980 SC G.SKILL Ripjaws V Series 32GB (2x16GB) 
Hard DriveHard DriveHard DriveCooling
Western Digital Blue 1TB Samsung 850 PRO Western Digital Black 1TB NZXT Kraken X61 
OSMonitorMonitorMonitor
Windows 10 Pro Asus VG248QE Samsung Syncmaster 2494 LG LF5600 42-Inch 1080p LED TV 
KeyboardPowerCaseMouse
Logitech G710 Seasonic Platinum 660XP 660W NZXT H440 Logitech G502 Proteus Core 
Mouse PadAudioAudio
Glorious Extended Gaming Mouse Mat Klipsch Promedia 2.1 Sennheiser HD 558 
CPUGraphicsRAMHard Drive
Quad core Krait 450 CPU 2.7GHz (Qualcomm Snapdr... Adreno 420 GPU 3GB RAM 32GB 
OSMonitor
Android Lollipop 5.0.1 6" 1440x2560 display (493 ppi) 
  hide details  
Reply
post #2 of 5
Code:
man chmod
man chown
man chgrp
I honestly don't know how to do it offhand, but the man pages are the first place I'd check.
post #3 of 5
Thread Starter 
Cool thanks for the help...though I have used the MAN...it wasn't very helpful.

I simply set the owner of the folder using the chgrp command, and set the chmod to 700 for the two folders folders, and 744 for the public folder.
Hades
(19 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 7700K ASRock Z270 Gaming K6 EVGA GeForce GTX 980 SC G.SKILL Ripjaws V Series 32GB (2x16GB) 
Hard DriveHard DriveHard DriveCooling
Western Digital Blue 1TB Samsung 850 PRO Western Digital Black 1TB NZXT Kraken X61 
OSMonitorMonitorMonitor
Windows 10 Pro Asus VG248QE Samsung Syncmaster 2494 LG LF5600 42-Inch 1080p LED TV 
KeyboardPowerCaseMouse
Logitech G710 Seasonic Platinum 660XP 660W NZXT H440 Logitech G502 Proteus Core 
Mouse PadAudioAudio
Glorious Extended Gaming Mouse Mat Klipsch Promedia 2.1 Sennheiser HD 558 
CPUGraphicsRAMHard Drive
Quad core Krait 450 CPU 2.7GHz (Qualcomm Snapdr... Adreno 420 GPU 3GB RAM 32GB 
OSMonitor
Android Lollipop 5.0.1 6" 1440x2560 display (493 ppi) 
  hide details  
Reply
Hades
(19 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 7700K ASRock Z270 Gaming K6 EVGA GeForce GTX 980 SC G.SKILL Ripjaws V Series 32GB (2x16GB) 
Hard DriveHard DriveHard DriveCooling
Western Digital Blue 1TB Samsung 850 PRO Western Digital Black 1TB NZXT Kraken X61 
OSMonitorMonitorMonitor
Windows 10 Pro Asus VG248QE Samsung Syncmaster 2494 LG LF5600 42-Inch 1080p LED TV 
KeyboardPowerCaseMouse
Logitech G710 Seasonic Platinum 660XP 660W NZXT H440 Logitech G502 Proteus Core 
Mouse PadAudioAudio
Glorious Extended Gaming Mouse Mat Klipsch Promedia 2.1 Sennheiser HD 558 
CPUGraphicsRAMHard Drive
Quad core Krait 450 CPU 2.7GHz (Qualcomm Snapdr... Adreno 420 GPU 3GB RAM 32GB 
OSMonitor
Android Lollipop 5.0.1 6" 1440x2560 display (493 ppi) 
  hide details  
Reply
post #4 of 5
Do a "ls -l"
ex.
drwxr-xr-x 2 jtyu other 512 Feb 26 2009 jtyu

jtyu < owner
other < group


drwxr-xr-x < first letter to the left denotes its a directory, can be an l (el) for link.
succeeding 3 rwx, read write execute permission for its user (owner)
succeeding 3 r-x, read execute perm for group
succeeding 3 r-x, read execute perm for others(anyone)


to change owner(and group too!) "chown <owner>:<group> <file/directory>"
owner alone "chown <owner> <file/directory>"
to change group alone "chgroup <file/directory>"
Edited by ConradTP - 5/15/11 at 5:51pm
post #5 of 5
lol if you want to TOTALLY deny access to everyone outside of the group you can remove the third execute bit so like chmod 770... and then 775 for others to be able to read the files inside and browse it but not edit anything

they wont even be able to open the directory without owning it or being in the group...

and then you can just do a "chown :group directory" or just chgrp without the :
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
Kinda meh now...
(13 items)
 
  
CPUMotherboardGraphicsRAM
PhII 940 BE asus M4N82 Deluxe 2x 8800gts(g92) 2x 1g ocz ddr2 1066 
Hard DriveOptical DriveOSMonitor
/dev/sd[abc] /dev/sr0 WinXP/Linux 22in acer 
PowerCaseMouseMouse Pad
950w rosewill timebomb Antec 900 (2small) Voodoo Deathadder (RED!) X-Trac Pads Ripper XL 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › [Solved] Giving a group full access while all others are denied....