image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old August 13th, 2008, 09:55 AM
Registered User
 
Join Date: Aug 2008
Location: Maryland
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
nathaniel is on a distinguished road
Post Create an undeletable file in Leopard

I have an encrypted diskimage.sparseimage that I made to contain sensitive financial data. It is read/write so I can update it with constantly changing information, which means "locking" it doesn't do me much good.

Being encrypted it's relatively safe, except for the fact that it's easily deletable. That doesn't do me much good.

How can I make this file undeletable in OS X.5.4 yet maintain its ability to be written to? There is only one account on the system but occasionally others use the machine, and I'd rather not delete it accidentally myself.

I would much prefer this solution use Leopard itself, terminal or system GUI, rather than extra software.
Reply With Quote
  #2  
Old August 13th, 2008, 10:04 AM
nixgeek's Avatar
Mac of the SubGenius! :-)
 
Join Date: Jan 2004
Location: Miami, FL
Posts: 8,460
Thanks: 30
Thanked 152 Times in 136 Posts
nixgeek is a jewel in the roughnixgeek is a jewel in the roughnixgeek is a jewel in the rough
Best thing would be to create a guest account for others to use. It's of no use if you're encrypting your files and allowing others to use your account. Password protect your account and create a guest account for everyone else, that way your files will stay protected from deletion by the default permissions set.
__________________
Apple iMac G5 17" (2 GHz G5) - Mac OS X 10.4.11/Ubuntu 9.10
Asus Eee PC 901 (1.6 GHz Atom N270) - Ubuntu 9.10
Apple Macintosh Quadra 650 (33 MHz MC68040) - Mac OS 8.1
"JHVH-1" (2 GHz AMD Athlon XP 2400+) - Slackware 13
"Kidbuntu" (2.8 GHz Celeron D 335) - Ubuntu 9.10
Reply With Quote
The Following User Says Thank You to nixgeek For This Useful Post:
nathaniel (August 13th, 2008)
  #3  
Old August 13th, 2008, 10:20 AM
Registered User
 
Join Date: Aug 2008
Location: Maryland
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
nathaniel is on a distinguished road
Is there no way to at least make it so the file cannot be deleted without administrator password?
Reply With Quote
  #4  
Old August 13th, 2008, 10:41 AM
ElDiabloConCaca's Avatar
Registered User
 
Join Date: Aug 2001
Location: San Antonio, Texas
Posts: 13,000
Thanks: 8
Thanked 444 Times in 425 Posts
ElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of light
You could effectively change permissions on the file, but I don't know whether this would prevent it from actually being put into the trash. One pitfall of this is that you may not be able to mount the disk image without jumping through hoops, like perhaps mounting the image from the terminal with the "sudo" command.

...but nixgeek's got the best solution: Mac OS X is set up to be a multi-user operating system, and each unique user is meant to have their own user account. Allowing multiple people to share one account (and an "administrator" account at that! Gasp!) is counter-intuitive to the way the operating system is meant to be used.

To keep your files untouchable by other users, the correct, most efficient, and easiest solution is to use the multi-user environment as it was intended, and have each user have their own user account. That way, your files are your files and cannot be touched by others, and vice-versa. Trying to simulate a multi-user environment with only a single user will lead to frustration and issues like the one you describe. Kind of like multiple people trying to drive the same car at once -- fighting over the steering wheel, people pushing the brakes when you're trying to accelerate, changing the pre-set radio stations when you're not looking, etc... i.e., nothing but frustration and clashes.

While I realize you probably have your setup the way you do for a reason, I do highly suggest you try out the multi-user approach.
__________________
Mac mini 2.0GHz 10.6.2 • 4GB • 320GB • Superdrive • 4 x 1TB USB 2.0 • LED Cinema Display
MacBook 2.0GHz Core 2 Duo - White 10.6.2 • 4GB • 250GB • CD-RW/DVD-ROM
iPhone 3G 8GB • iPod Touch 8GB • iPod Photo 60GB • iPod nano 1GB • AT&T U-Verse 12Mb/1.5Mb
http://www.jeffhoppe.com
Reply With Quote
The Following User Says Thank You to ElDiabloConCaca For This Useful Post:
nathaniel (August 13th, 2008)
  #5  
Old August 13th, 2008, 11:11 AM
Registered User
 
Join Date: Aug 2008
Location: Maryland
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
nathaniel is on a distinguished road
Thanks very much. I'll just be sure to back it up. I was just hoping there was a possibility with ACL or something.

I'll have to do some consideration of a guest account.
Reply With Quote
  #6  
Old August 13th, 2008, 12:26 PM
bbloke's Avatar
Registered User
 
Join Date: Jun 2002
Location: UK
Posts: 1,544
Thanks: 1
Thanked 25 Times in 22 Posts
bbloke has a spectacular aura aboutbbloke has a spectacular aura about
Quote:
Originally Posted by nathaniel View Post
Thanks very much. I'll just be sure to back it up. I was just hoping there was a possibility with ACL or something.
Actually, is this not possible? I thought ACLs could be used for this sort of purpose. That is: so you could potentially create a file that multiple user accounts have read/write access to, but which cannot be deleted by those users.

At this very moment, I'm away from my OS X systems and my UNIX knowledge is slowly going rusty, so you'll have to bear with me a bit! Apple has an online man page for chmod which describes the usage of ACLs. You may be able to use...

chmod +a "[user or group] deny delete" [file]

...syntax to get the result you are after.

Also, you could have a look at A. P. Lawrence's page on ACLs under OS X. I'm open to being wrong here, but I suspect this route might be worth looking into in more detail.
Reply With Quote
  #7  
Old August 13th, 2008, 12:47 PM
nixgeek's Avatar
Mac of the SubGenius! :-)
 
Join Date: Jan 2004
Location: Miami, FL
Posts: 8,460
Thanks: 30
Thanked 152 Times in 136 Posts
nixgeek is a jewel in the roughnixgeek is a jewel in the roughnixgeek is a jewel in the rough
Quote:
Originally Posted by bbloke View Post
Actually, is this not possible? I thought ACLs could be used for this sort of purpose. That is: so you could potentially create a file that multiple user accounts have read/write access to, but which cannot be deleted by those users.

At this very moment, I'm away from my OS X systems and my UNIX knowledge is slowly going rusty, so you'll have to bear with me a bit! Apple has an online man page for chmod which describes the usage of ACLs. You may be able to use...

chmod +a "[user or group] deny delete" [file]

...syntax to get the result you are after.

Also, you could have a look at A. P. Lawrence's page on ACLs under OS X. I'm open to being wrong here, but I suspect this route might be worth looking into in more detail.
I would imagine so, but if they're logged in with his account wouldn't this be moot?
__________________
Apple iMac G5 17" (2 GHz G5) - Mac OS X 10.4.11/Ubuntu 9.10
Asus Eee PC 901 (1.6 GHz Atom N270) - Ubuntu 9.10
Apple Macintosh Quadra 650 (33 MHz MC68040) - Mac OS 8.1
"JHVH-1" (2 GHz AMD Athlon XP 2400+) - Slackware 13
"Kidbuntu" (2.8 GHz Celeron D 335) - Ubuntu 9.10
Reply With Quote
  #8  
Old August 13th, 2008, 12:59 PM
bbloke's Avatar
Registered User
 
Join Date: Jun 2002
Location: UK
Posts: 1,544
Thanks: 1
Thanked 25 Times in 22 Posts
bbloke has a spectacular aura aboutbbloke has a spectacular aura about
Quote:
Originally Posted by nixgeek View Post
I would imagine so, but if they're logged in with his account wouldn't this be moot?
Oh, sure, but I was referring to this method in addition to adopting a multi-user approach, as you and ElDiabloConCaca have described!

Anyway, even if it is a case of one file being accessed through only one account, nathaniel also seemed worried about deleting the file (accidentally) himself. Using ACLs should be able to prevent that too by using "deny delete."
Reply With Quote
Reply

Bookmarks

Tags
disk image, leopard, undeletable

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
Copyright 2000-2010 DigitalCrowd, Inc.