?
Solved

How can I make my Linux server file permission be 4777 by Default?

Posted on 2008-11-12
10
Medium Priority
?
979 Views
Last Modified: 2013-12-16
How can I make my Linux server files as 4777 by default? At present it is at 455.
0
Comment
Question by:whspider
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 10

Expert Comment

by:kyleb84
ID: 22946208
I assume your talking about Samba server?
0
 

Author Comment

by:whspider
ID: 22946231
Sorry that I did not mentioned the OS it is CentOS Linux. How can we go with having file permission 4777 by default?
0
 
LVL 10

Expert Comment

by:kyleb84
ID: 22946622
I need to know the context of what your talking about...

Are you accessing these files from other networked computers via NFS or Windows File Sharing? Or are you talking about users that log on to this server's terminal and do work?
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
LVL 4

Expert Comment

by:larsga
ID: 22946671
If this is samba (i.e., windows file sharing), try adding the following to smb.conf:

create mask = 4777
force create mask = 4777

If that doesn't work, could you please explain better what you are trying to achieve?
0
 

Author Comment

by:whspider
ID: 22947167
Well this is a web server and we run CentOS Linux. The users are web site developers and hosting customers. In windows servers it is 4777 by default. But in Linux it is usually 455. If we need to edit any file we need to give write permission. For scripts like Joomla and other is just not functioning in our server until we give the command chmod 4777 to all files through SSH. Any way we are making all the files  as 4777 so will there be any way to make all the files as 4777 by default? what ever the files we upload after this can also be taken as 4777?


0
 
LVL 4

Expert Comment

by:larsga
ID: 22947180
How are the files uploaded? Web interface? FTP? SSH/SFTP?

In short, you need to look into the configuration of the particular service they are using to upload files and see if you can set default file permissions there.
0
 

Author Comment

by:whspider
ID: 22947203
We upload trough all the means which you have stated. And well I would like to know where is such configuration file and which part I need to update and as what.

0
 
LVL 19

Expert Comment

by:jools
ID: 22948143
Perhaps it's a group thing, is it faesable to add the users in question into the apache group?

Or you could try looking at umask. Note that it's a mask and not the permissions you want set. This would be added to the users .bash_profile.
   man umask

0
 

Author Comment

by:whspider
ID: 22948773
I'm trying with that now.
0
 
LVL 14

Accepted Solution

by:
arrkerr1024 earned 2000 total points
ID: 22952874
I can maybe help explain the problem better:

When using a control panel such as plesk, or even manually setting up web site, you would create a user and a group for each site and the site's root folder would be owned by that user/group.

When you install joomla, which you can use to manage content (ie: upload files), it runs as the apache user.  You end up with a conflict between managing files through plesk/ftp/sftp (they get owned by the site owner) and joomla (they get owned by apache).

Probably the best idea is to add the apache user to each web site group, but you'd have to hook in to your control panel;s (ie: plesk) functionality - which I'm not sure is always possible.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question