LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2008, 12:20 PM   #1
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
getting permissions to stick?


on my web server i have 2 users that are part of the website group. i want the umask of both users to be 002 so they can create files and directories that are group writable. this way if user1 creates a directory user2 can interact, create subdirectories, delete files and directories etc... without having to have root chmod -R g=u,o=u-w . withing the default directory of the web page every time a file or directory is changed.

user1 connects via ssh either from linux or OSx, user2 uses winSCP

http://winscp.net/eng/index.php

to connect from windows and from time to time will use putty.

now in the .bashrc under both user1 and user2 umask 002 has been set.

Code:
cat .bashrc 
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

#set file creation mask
umask 002

alias d='ls -laF'

# User specific aliases and functions
is that not set correctly?
 
Old 01-15-2008, 01:06 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Changing ~/.bashrc will only change your user environment. To make the change global (affecting all users) edit /etc/profile.
Code:
#
# The user file-creation mask
#
umask 002
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating directories with owner/permissions that stick amg_ Linux - Newbie 4 11-28-2007 12:11 AM
Making device permissions stick mugwump84 Linux - Newbie 3 04-05-2005 04:35 PM
SuSE 9.1 Permissions, how to make 'em stick hoopyfrood Linux - Distributions 10 08-14-2004 11:21 PM
Mixing 512MB Ram 2700 stick with a 256MB 3200 stick? Will it screw things up? Fear58 Linux - Hardware 2 07-15-2004 01:20 PM
Why do my directory permissions not stick permanently? h00chman Linux - Newbie 3 03-20-2004 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration