- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Folder permissions
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 04:13 PM
04-19-2007 04:13 PM
I have one folder in / named as 'ugs'. In this folder our application will create some folders, application is running with root permissions. So all the folders owner is root only. Root only able to edit.
But user requirement is that anybody should have read,write,execute permissions in ugs folder, So i have set permissions like below.
I have created one group name 'per', then I have added all the users into that group. Then
chown -R root:per ugs
chmod -R 777 ugs
But the problem is, whenever our application creating new folders..... root only able to edit that folders, other not able to do anything.
How we can set 777permission for new directories automatically?
or
we can set through SETUID or SETGID?? If yes provide me the examples.
Regards,
Sudhakaran.K
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 04:34 PM
04-19-2007 04:34 PM
Re: Folder permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 04:59 PM
04-19-2007 04:59 PM
Re: Folder permissions
We can't do anything with that application, is there anyother way is there?
Regards,
Sudhakaran.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 06:32 PM
04-19-2007 06:32 PM
Re: Folder permissions
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 06:59 PM
04-19-2007 06:59 PM
Re: Folder permissions
We can do like this, but the problem is folder size is more than 50 GB.
while running the script it will impact the server performance.
So user not ready to agree for this script.
Any other suggestions?
Regards,
Sudhakaran.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 07:19 PM
04-19-2007 07:19 PM
SolutionYou have to think of this as two separate problems:
1.) the files must be created with correct permissions: this is done using "umask"
2.) the files must be owned by the "per" group: this is done using setgid bits on the directories.
To solve the first problem:
Run "umask 007" before starting the program and create some files.
New files should now get permissions -rw-rw---- and new directories drwxrwx---.
If you want read-only access to everyone that is *not* a member of the group "per", set "umask 002" instead.
To fix the second problem:
To get the new files and directories automatically owned by group that owns the directory the file/directory is created in, you must set the "setgid" bit for the _directories_ only. Any new subdirectories created after this will automatically inherit the correct group _and_ the setgid bit.
The simplest way to set the setgid bit to all directories of the ugs directory tree at this point is:
find /ugs -type d | xargs chmod g+s
If there are any directories that contain a space character in their names, this command will produce error messages (as the chmod command thinks each part is a complete directory name). You must then change those directories manually with:
chmod g+s "name of directory with spaces"
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 08:16 PM
04-19-2007 08:16 PM
Re: Folder permissions
First of all thanks for your brief & clear explanations.
Now problem is I can't set umask value to 007 or 002, because in the same server other applications also running. If I change umask value other applications will get disturb.
So we can't change the umask value.
* Is it possible to apply umask value to particular folder??
* Is there any way to achieve through ACL or etc..
Regards,
Sudhakaran.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 10:02 PM
04-19-2007 10:02 PM
Re: Folder permissions
you only need to modify the umask for this application - not globally for the whole server:
Just do it before starting the application.
Next: If possible, change the group of your application to 'per' and set the s-Bit for the group, so newly created files and directories will belong to the group 'per':
chgrp per /path/to/your/appl.exe
chmod g+s /path/to/your/appl.exe
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 10:15 PM
04-19-2007 10:15 PM
Re: Folder permissions
Application side we don't have any access. We tried to inform application team, they are accepting to change umask value in application itself.
Changing the group also is not possible. Already application is running in different group.
Regards,
Sudhakaran.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 10:17 PM
04-19-2007 10:17 PM
Re: Folder permissions
Now Application team is not accepting to change umask & gid.
Any other suggestions?
Regards,
Sudhakaran.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 10:53 PM
04-19-2007 10:53 PM
Re: Folder permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 10:54 PM
04-19-2007 10:54 PM
Re: Folder permissions
I'm asking myself why an application team is involved:
- Is the application started my themselves or do you start the application?
If it's the task them, your job is done: forward the requirement of the users to that application team, attach the suggestion of simply changing the umask und give that feedback to your users.
If it's your task, wrap the start of the application in a two-liner:
#!/usr/bin/sh
umask 007
/start/of/application
Then change the group ownership of the directory structure under 'ugs' to match the real group of the application.
mfG Peter
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2007 11:33 PM
04-19-2007 11:33 PM
Re: Folder permissions
We have explained the scnerio to application team, and asked them to include umask value.
They are telling, we can't include anything to their program, and also they are client for us. So we can't order them.
Now user requesting to do this task through operating system commands.
Regards,
Sudhakaran.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 12:13 AM
04-20-2007 12:13 AM
Re: Folder permissions
ok, customer is king, or something tike that ...
Are there arguments against solution2?
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 02:16 AM
04-20-2007 02:16 AM