- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Is it possible to allow dir creation but NOT file ...
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
03-14-2007 04:01 AM
03-14-2007 04:01 AM
Is it possible to allow dir creation but NOT file creation in a dir
is it possible to allow a user to create a directory in one directory but disable file creation in this dir?
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:04 AM
03-14-2007 04:04 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:09 AM
03-14-2007 04:09 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
because they shall create directories there
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:14 AM
03-14-2007 04:14 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
Best of luck on this.
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:14 AM
03-14-2007 04:14 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
No not possible, if you (the user) is allowed to write inside a directory unix will allow the creation of files and directories.
Education of the users is only option :-)
Gruss.
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:18 AM
03-14-2007 04:18 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
Only way I think it may be remotely possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:18 AM
03-14-2007 04:18 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
quick, but not very permanent way is to set the umask of user to 222.
That way they can create the dir (r-xr-xr-x), but within the dir they can not create a file as no write permission.
They user however could override by doing a chmod on the dir first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:22 AM
03-14-2007 04:22 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
then any good suggestions for an applicable user education? *49*
;-) V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:39 AM
03-14-2007 04:39 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
Well, a bit nasty, but we have had to resort to this in the past; run a cron job (or daemon) to check the directory for regular (and binary) files periodicaly, change ownership and permission.
This forces the user to come to you to help release his/her "unauthorized" file.
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 04:53 AM
03-14-2007 04:53 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
not bad - do you have more informations (cron command)?
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 05:10 AM
03-14-2007 05:10 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
#!/bin/sh
sudo -u dir_owner mkir /path/to/dir/${1}
then just have the users run that script when they need to make a directory under that specific directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 05:38 AM
03-14-2007 05:38 AM
Re: Is it possible to allow dir creation but NOT file creation in a dir
Here's a down and dirty that can be edited to fit your needs.
for i in `ls /directory/path/`
do
if [ -f $i ]
then
chown someone:whatever /directory/path/$i
chmod 400 /directory/path/$i
fi
done
Best of luck.
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 09:27 PM
03-14-2007 09:27 PM
Re: Is it possible to allow dir creation but NOT file creation in a dir
sudo will not work, because the directory creation is made by an application (not mine).
Nevertheless it's a nice idea ...
This application is also the reason for my question - it creates the (sub-)dir's for the user, but sometimes something fails, so the application lays the files in this dir instead of creating the subdir and laying the files in the subdir.
Maybe the vendor can do something ...
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2007 10:46 PM
03-14-2007 10:46 PM