I'm not a Unix expert, but I have been using it for a few months now, and these errors are boggling my mind. My scenario is as follows: I copied a bunch of files over to a unix server from my normal user account (let's call it "bob"), and now I need to run a script on them as a different user (let's call it "joe") that involves using "touch" on them. I've chmoded their permissions to 777 and did the same to the folder they're in. Nevertheless, when I run touch on them as joe, I get the operation not permitted error. When I run touch as bob it works.
So fine. I figured I'd get to the bottom of that issue later, and would just chown the files to joe for now, just to get my project finished. No can do. Running chown as bob on files that bob owns also returns "operation not permitted!!!" Now I'm just completely confused.
So, really, I have two questions:
1. Why can I not touch files as a user who does not own those files even when I have write permissions on them? What other permissions do I need? I thought a chmod 777 would give me everything I could possibly require.
2. Why can I not chown files I own to a different user? This has worked for me on Ubuntu before. What about this Unix server is preventing this, and how can I get around it?
I'd really appreciate any help you guys can give me.