|
|
| Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate. |
|
|||||||
| TouchArcade.com - iPhone Game Reviews and News |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
macrumors 6502
Join Date: Feb 2007
|
How to Make Sure a File is Never Replaced?
Hopefully there is an answer to this..
I replaced a file inside of the contents of an application and I was wondering if there is a way I could lock the file or somethin so it never gets replaced.. is this possible in any way? if not.. what else can I do to make sure the file works after updates? |
|
|
|
|
|
#2 |
|
macrumors 603
Join Date: Jul 2005
|
why o why do i feel this is dealing with piracy?
call me a skeptic what exactly are you worried about replacing op?
__________________
Old Bike: 2008 Kawasaki Ninja 250r Green Current Bike: 2003 Suzuki SV650S Copper
|
|
|
|
| dukebound85 |
| View Public Profile |
| Find More Posts by dukebound85 |
|
|
#3 |
|
macrumors 601
Join Date: May 2008
Location: Texas!
|
I'm not following why someone would want to do this, unless they're installing malware of some sort.
|
|
|
|
| GGJstudios |
| View Public Profile |
| Find More Posts by GGJstudios |
|
|
#4 |
|
macrumors Demi-God
|
you could just buy the software, or being very very careful, ( no i am not condoning software piracy
)
|
|
|
|
| Bennieboy© |
| View Public Profile |
| Find More Posts by Bennieboy© |
|
|
#5 |
|
macrumors 601
Join Date: Aug 2005
Location: Ohio
|
Depends on what you mean by "never." From Finder, select file > Get Info > checkbox for Locked. That should be a reasonable effect. Admin will always be able to replace if desired, there's no getting around that.
|
|
|
|
|
|
#6 |
|
macrumors regular
Join Date: Oct 2007
|
You are really not giving details, and all the important information is in the details. But you might want to take a look at the man page for 'chflags'. There are both the 'uchange' and the 'schange' flags that might do what you want to do.
|
|
|
|
|
|
#7 |
|
Thread Starter
macrumors 6502
Join Date: Feb 2007
|
i laughed at the replies
this doesnt have to deal with piracy at all.. I have 1Password and if you have it you know that it places an Icon which is usually "1P" in your browser bar by the back/forward buttons. it does this by putting a file in the firefox applications folder telling it to get the button image from inside the 1Password contents folder.. So I modded the Icon so it matches my firefox theme (just gotta figure out how to move the button down!)![]() I just dont want the png file for the button to be replaced if I upgrade 1password So as you can see! no piracy!
|
|
|
|
|
|
#8 |
|
Contributor
Join Date: May 2009
|
I suppose you can change the permissions to the file to read only, and that may "protect" it.
__________________
Unibody MacBook Pro 2.53 GHz, 4GB ram, 500GB HDD; iPhone 3Gs 32GB
|
|
|
|
|
|
#9 |
|
macrumors 601
Join Date: Aug 2005
Location: Ohio
|
The lock suggestion I gave may help, but something you want to think about is that if the updater cannot copy in a new file it could cause an error and break 1Password.
|
|
|
|
|
|
#10 |
|
macrumors 601
Join Date: May 2008
Location: Texas!
|
As you can see from this thread, it helps if you fully describe what your problem is and what you're trying to accomplish. That way, you'll get more useful replies.
|
|
|
|
| GGJstudios |
| View Public Profile |
| Find More Posts by GGJstudios |
|
|
#11 |
|
macrumors regular
Join Date: May 2009
|
There is one reason why someone may change a file in a package. 1Password does not support Camino 2 at this time. Thus we have to change a plist file for supported browsers. This is an official "hack" for 1Password to get Camino 2 to work. Nothing illegal about it. And it would be annoying to have to replace that change should 1Password do an update and over-write that file.
If a file is part of a package (single file application), I'm not sure you can prevent it from being replaced. The best bet is to create a folder mimicking the structure of the package and put a copy of the edited file there so it can be easily replaced as needed. |
|
|
|
|
|
#12 |
|
macrumors 6502a
Join Date: Jun 2009
|
As you can see from this thread, it helps if you don't jump to conclusions and just give people the benefit of the doubt. That way you don't waste your time falsely accusing people.
|
|
|
|
|
|
#13 |
|
macrumors 6502
Join Date: Sep 2005
Location: London
|
sudo chflags schg name_of_file.png
Is the daddy of file locking. Set this and not even root can remove the file. It is system immutable... If you do want to remove afterward, boot your mac into single user mode with command+s. cd to the relevant directory and enter: chflags noschg name_of_file.png No one can say if a 1Password update will fail if it tries to update the file. A case of try and see, and if it does you can unset the flag and make a backup copy of the image. to re-apply after. Job as they say is a good un.
__________________
KISS is a principle i'd love to live by, if only life would allow. ![]() MacPro 06 Quad 2.0GHz, 12GB, 60GB SSD, 3x250GB Stripe, 250GB XP & 2.7TB Drobo.
|
|
|
|
|
|
#14 |
|
macrumors 601
Join Date: May 2008
Location: Texas!
|
I didn't jump to any conclusions. Nor did I make any assumptions about or accuse anyone of anything. Reading comprehension is a good thing! You should try it!
|
|
|
|
| GGJstudios |
| View Public Profile |
| Find More Posts by GGJstudios |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|