LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-03-2010, 09:37 AM   #1
Friis
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
keep chmod on folder, sub-folder and files


I got a folder that I transfer stuff to all the time.
the folder is in chmod 775 but when i upload folders and files, they are given chmod 700, but i want it chmod 775 everytime i upload something.

so far i have logged in to my linux computer and did a chmod -R 775 to the folder every time i uploaded something to it.

is there a function somewhere to make it 775 everytime i upload or can i have something run a script, so i don't have to go in and write it everytime i upload something?
 
Old 11-03-2010, 10:52 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
I think you need a combination of setgid and acl's.

http://www.linuxquestions.org/questi...folder-605129/
http://www.vanemery.com/Linux/ACL/linux-acl.html#using
 
Old 11-03-2010, 10:55 AM   #3
module0000
Member
 
Registered: Feb 2010
Location: USA
Distribution: RHEL
Posts: 36

Rep: Reputation: 15
Quote:
I got a folder that I transfer stuff to all the time.
the folder is in chmod 775 but when i upload folders and files, they are given chmod 700, but i want it chmod 775 everytime i upload something.
This is your umask, it sets default permissions on new files. Check your ~/.bashrc or /etc/profile for what your default umask is being set to. If you are using FTP to transfer these files, check your FTP daemons config file for the effective umask value.

Here is the man page excerpt for umask:

Code:
umask [-p] [-S] [mode]
              The user file-creation mask is set to mode.   If  mode
              begins  with  a  digit,  it is interpreted as an octal
              number; otherwise it is interpreted as a symbolic mode
              mask similar to that accepted by chmod(1).  If mode is
              omitted, the current value of  the  mask  is  printed.
              The  -S  option  causes the mask to be printed in sym-
              bolic form; the default output is an octal number.  If
              the  -p  option  is supplied, and mode is omitted, the
              output is in a form that may be reused as input.   The
              return  status  is  0  if  the  mode  was successfully
              changed or if no mode argument was supplied, and false
              otherwise.

Last edited by module0000; 11-03-2010 at 10:55 AM. Reason: typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
i need to copy files from one folder to another folder using shell anurupr Linux - Newbie 17 03-04-2010 09:07 AM
user permission help, can not chmod files and folder niitpro Linux - Newbie 1 03-05-2008 11:41 AM
How to automatically move files from one folder into another folder? xmrkite Linux - Software 6 11-05-2006 10:39 AM
Problem in using chmod with mounted folder casper234 Linux - General 5 02-13-2006 08:45 AM
Chmod rights and folder access fieldyweb Linux - General 3 08-24-2005 04:12 AM

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

All times are GMT -5. The time now is 10:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration