Permission change timestamp

how set permission for other user to change timestamp of file owned by me?
I can set write permission via 'chmod 664 file' for any user in the same group.  Then these user can write to the file.  but they are not permitted to issue a 'touch file' command, i.e. change the modified timestamp.  This is new for me, on my previous systems, windows and Linux, write permissions automatically include the right to change the timestamp.
How can I grant this right to the group in Mac OS X?  It is important for a reasonable sync process with external files to be performed by all users of the group.
cheers, Neo.

The time modification is performed by the function utime (or on some systems utimes)
Mac OS X utimes man page:
If times is NULL, the access and modification times are set to the current time.  The caller must be the owner of the file, have permission to write the file, or be the super-user.
If times is non-NULL, it is assumed to point to an array of two timeval structures.  The access time is set to the value of the first element, and the modification time is set to the value of the second element.  The caller must be the owner of the file or be the super-user.
'touch' without the -t argument pass a NULL 'times' structure to the utimes() call.  A non-NULL 'times' structure has the restriction you must be root or the file's owner to change the time.
Solaris:
If times is NULL, the access and modification times of the file are set to the current time. A process must be the owner of the file or have write permission to use utime() in this manner.
If times is not NULL, times is interpreted as a pointer to a utimbuf structure (defined in <utime.h>) and the access and modification times are set to the values contained in the designated structure. Only the owner of the file or a process that has the {PRIV_FILE_OWNER} privilege asserted in its effective set can use utime() in this manner.
Same basic rules.
Linux:
If buf is NULL, then the access and modification times of the file are set to the current time.
Changing time stamps is permitted when: either the process has appropriate privileges (Linux: has the CAP_FOWNER capability), or the effective user ID equals the user ID of the file, or buf must is NULL and the process has write permission to the file.
Again, the same basic rules.
The X/Open standards:
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/utime.html>
If times is a null pointer, the access and modification times of the file shall be set to the current time. The effective user ID of the process shall match the owner of the file, or the process has write permission to the file or has appropriate privileges, to use utime() in this manner.
If times is not a null pointer, times shall be interpreted as a pointer to a utimbuf structure and the access and modification times shall be set to the values contained in the designated structure. Only a process with the effective user ID equal to the user ID of the file or a process with appropriate privileges may use utime() this way.
Everyone is following the standards

Similar Messages

  • Desktop permission changes

    I would like some help regarding permissions. In our office, each employee uses their own iMac and we are on a small Ethernet network. There are four iMacs and each is running Snow Leopard. I have configured it so that each iMac is sharing its desktop. In our office workflow, my co-workers and I intuitively share files by dropping them onto each other's desktops.No need to hunt in our drop boxes which are buried a few levels.
    ISSUE: When I put a file onto a co-worker's desktop, the file permission changes to 'nobody'. If they continue to work on the file and try to save it, they can't. So in order to continue working on a file they have to 'Get Info' first and change the permissions to 'Read & Write' for themselves. However, if I ask my co-worker to get the file from my desktop, the file's permissions are fine and they can open, modified, and save the file without a problem.
    QUESTION: Is there a way to configure our settings so that files can be put onto the desktop's of other co-workers without having to mess with the permissions each time? Why does it work one way (get) but not the other way (put)?

    You don't have permissions to modify an item you do not own.  When you copy a file to another account, it keeps your ownership and permissions, which means only you can write to it.  When another user copies your files, they own the copies, which lets them write to it (you might not have noticed, but you won't have permission to write to their copies, either).
    You can use ACL (Access Control List) entries to give additional permissions - each user's Drop Box folder is also set up this way.

  • Unable to save permission changes in templates in win 2012

    Hi,
    PKI set up of (2003 and 2008) based Sub CA and 2003 based AD ( with schema version supporting 2008) is running in the enviornment. Now CA is migrating to 2012 setup. When i try to create template and make permission changes, it says " unable to save
    permission changes. Directory object not found". When i duplicate and save the template with name change and wait for 10-15 min and then open that template again and make permission changes, it works.
    Just wanted to know if this is because of some feature issue and will it get resolved if AD is upgraded to 2012 schema.
    Thanks
    Neha Garg

    On Fri, 13 Feb 2015 07:07:13 +0000, Neha.ga wrote:
    Also, I checked with my AD person. They are also saying that it can be because of current DC architecture and may be a normal thing. Currently they have 2003 AD  and they will upgrade schema version for 2012 to see if that makes any change.
    As Brian said, this is likely due to replication delays. Updating the
    schema version is not likely going to resolve this. If you know how to work
    around the issue then I wouldn't worry about it too much. Creating new
    certificate templates should not be a frequent task.
    Paul Adare - FIM CM MVP
    Penguin Trivia #46: Animals who are not penguins can only wish they were.
    -- Chicago Reader 10/15/82

  • Finder Windows Always Locked - After Permission Change

    Hello.
    I noticed that other users on my computer had access to some folders (those I created) within my home directory. I didn't want this to be the case so I set permissions for my home directory and did "Apply to all items" so that the permissions are now "Me - Read & Write" and "everyone - Write only (Drop Box)." I am an administrator on the computer.
    Now, every time I do a "get info" on a folder I have to unlock it by typing in my password, whereas before the get info windows were unlocked. I'm not positive the permission change is what cased the locked Finder windows, but I think that is what caused it. Also, I tried unlocking the folder and then doing the "apply to enclosed items" but that did not help.
    Thanks for any help,
    KK

    1. Use the "apply to enclosed items" option with great care. Not all items in your home folder should have the same settings, & certainly you would not normally want everyone to be able to write to them all, even if they can't read what they put there!
    2. AFAIK, in Leopard the lock at the bottom of the Get Info window always is in the locked state when the window is first opened, regardless of who owns the item it shows. Generally, you only need to unlock it with an admin password to make sharing & permissions changes. If you own the file, you should be able to (for instance) add Spotlight comments or change the name without needing to unlock it. IOW, the lock is for the sharing & permissions section, not the entire window.

  • EXC_BAD_ACCESS (SIGBUS) with .pkg file after permission change on my HDD

    Hi everybody excuse my english, i'm form french.
    I'm here because I can not install my mobile modem 3G driver (.pkg). When I try to install I have this message *Setup can not open the package. It is likely that the executable file for applications installation has no property rights and / or authorizations.* and after crash and give me exception error *KERNPROTECTIONFAILURE at 0x0000000000000027*.
    Thanks for your help

    Nobody can help me?? I think my installer.app is corrupted due to permission change and I tried all disk authorization repair but nothing to do. There are no apple responsable support in this forum??
    thanks

  • Ddl trigger to track permission change in database

    Hi,
    How can I create a DDL trigger to log any permission change in a database?
    thanks
    oldmandba

    Your best approach is Event Notification.
    Event Notification vs DDL triggers:
    http://technet.microsoft.com/en-us/library/ms189855(v=sql.105).aspx
    BOL links on Event Notification:
    http://technet.microsoft.com/en-us/library/ms187476(v=sql.105).aspx
    http://technet.microsoft.com/en-us/library/ms182602(v=sql.105).aspx
    http://technet.microsoft.com/en-us/library/ms189453.aspx
    DDL Trigger solution:
    http://www.mssqltips.com/sqlservertip/2085/sql-server-ddl-triggers-to-track-all-database-changes/
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Permission changes after running maintainence scripts

    Everytime I ran the daily, weekly and monthly scripts, I will exprience a change in permission when I run disk utility. This is where it changed:
    Permissions differ on ./private/var/log/secure.log, should be -rw------- , they are -rw-r-----
    Is this permission change normal?
    They will stay correct until the next time I run the maintainence scripts though.

    Yes, that is normal; the BaseSystem.pkg defines the permissions on that log as 0600, while the weekly cron task sets the permissions on it to 0640 while rotating the log files. The difference between these settings is that any administrator can read the file while it is 0640, because the file's group is the admin group and the third value controls the group access.
    (10611)

  • /dev/null file permission changes frequently

    Hi,
    We are experiencing file permission change issue frequently for the
    following files:
    root@domain5 # ls -l /devices/pseudo/mm@0:null
    crw-rw-rw- 1 root sys 13, 2 Apr 22 2009
    /devices/pseudo/mm@0:null
    root@domain5 # ls -l /dev/null
    crw-rw-rw- 1 root sys 13, 2 Oct 25 07:01 /dev/null
    By default, above is the file permission settings. If the file permission
    changes, it will look like as below:
    root@domain5 # ls -l /devices/pseudo/mm@0:null
    cr--r--r-- 1 root sys 13, 2 Apr 22 2009
    /devices/pseudo/mm@0:null
    root@domain5 # ls -l /dev/null
    cr--r--r-- 1 root sys 13, 2 Oct 25 07:01 /dev/null
    Due to this file permission change the script which uses this file loose
    the write permission and the script fails. To fix this issue, we will be
    manually changing the permission. Can you please help me to know the cause for
    this file permission change.
    Thanks,
    Ram.

    You need to correlate any changes on the system to when you have the problem, or see the date on /dev/null change. Software packages can change this, applications can change this, sometimes even patch installs.
    Even certain administrative practices.
    Here's one example, where touching a vendor software-created printer config with native Solaris admintool would change /dev/null permissions
    http://www.rootunix.org/SOLARIS/printFAQ.txt
    10) ONLY ROOT CAN SEND PRINT JOBS:
    This problem is caused by network spooling software that for a
    network printer that uses /dev/null for the printer device. The
    software monitors the queue and spools the print requests over the
    network to the printer. If the printer setup is modified in any
    way with Admintool, the printer device (/dev/null) permissions will
    change to 600 owner lp.

  • [solved] Help undoing permission changes

    I got this error
    [2012-09-15 05:06] warning: directory permissions differ on usr/
    filesystem: 775 package: 755
    [2012-09-15 05:06] warning: directory permissions differ on usr/lib/
    filesystem: 775 package: 755
    while intsalling some packages and so hastily cd'ed into /usr and did 
    $ sudo chmod 775 ./
    $ sudo chmod 775 lib/
    is there any way to undo these changes, which from what I read is pretty unlikely, or at least to change them back to the predefined permission settings?  Like if yall happen to know that /usr is actually supposed to be 716 (just to pick a random number). 
    I've googled it and don't have much hope, but I think that I ought to do a bit more googling before giving up.
    Last edited by lspci (2012-09-15 11:49:54)

    Lennie wrote:775 is what you already had. 755 is what's recommended.
    Read the wiki page about chmod
    So my permission change wasn't a problem, then?  I didn't see anything in wiki article that mentioned the default setting, though I gathered from it that 755, was kind of recommended.

  • How to change timestamp for MacMail (Lion) - 3hours ahead

    Hello
    How do you change the timestamp in MacMail (Lion)? It is three hours ahead. My computer time is correct (Pacific time).
    For example, I send something at 9AM it says 12PM.
    Please let me know if there is something in the preferences I can change.
    Thanks in advance.

    Ok. So how is your System Preferences, Date & Time set up? For example, Are you doing the "Set time zone automatically... " thing? Are you doing the "Set date and time automatically" thing? Have you set a time zone?  Etc.
    charlie

  • PSE 10 Organizer on Mac shows wrong timestamps and changes timestamps

    Just installed PSE 10 on my Mac (OSX 10.6.8) performed an update to the raw converter (though I am NOT using raw files)
    All photos that I add to the catalog show a time stamp of 1hr before the photo was taken.  If I check the actual metatdata it shows correct for most of the fields.
    Exif data before adding to organizer: (using Exif Viewer 2.7.1)
    Image Created:          2012:03:21 07:27:26
    Image Generated:          2012:03:21 07:27:26
              Image Digitized:          2012:03:21 07:27:26
    I drag it into Organizer and it shows as being 3/21/2012 6:27am
    The exif data still shows properly in Exif Viewer.
    Ok, I can deal with that, it is very odd, but since it isn't changing the exif data it is somewhat ok. 
    Until....
    Now, I right click on the image and say open with Photoshop Elements Editor and immediately the time changes on the organizer screen to be one hour earlier from shown: 5:27am.
    PSE Editor File info shows the Created and Modified times on the desciption tab as 7:27, but on the Camera Data tab shows 3/21/2012 – 6:27 AM (the time organizer showed before I said to open editor)
    now Exif Viewer says:
    Image Generated:          2012:03:21 06:27:26
              Image Digitized:          2012:03:21 07:27:26
    close editor, and organizer is still saying the time is 5:27am
    Close organizer, open again, still shows 5:27am, exif data still shows:
    Image Generated:          2012:03:21 06:27:26
              Image Digitized:          2012:03:21 07:27:26
    I can repeat the open in editor and it again subtracts an hour from the time shown, and from the Image Generated exif data field.
    It appears that the organizer updates the timestamp when you say open in editor, and then sees that the timestamp changed and shows its 1hr subtracted time.
    Definate bug! It happens with JPG files from 3 different cameras (2 canon, 1 nikon) does not appear to happen with MP4 files from Flip.  but does happen with MOV files from at least 1 of the canon cameras.
    Any ideas?  I haven't found the place to report bugs for PSE10 yet.
    -Mike

    found a place to report the problem:
    http://feedback.photoshop.com/photoshop_family/topics/pse_10_organizer_on_mac_shows_wrong_ timestamps_and_changes_timestamps
    or: http://gsfn.us/t/2qfku
    If you have the same problem, please go there and click that you also have the problem to increase their awareness of the issue.

  • Strange wine behavior, home directory permission change!!

    hi all, archers.
    i'm an arch user since early 2007 and this is my first post. Since now i've always found every information needed and enjoyed this great distribution.
    btw, now i have a strange behavior with last version of wine in extra repository (0.9.61).
    situation:
    clean wine install, w/o .wine prefix from previous version creation (i always redo prefix creation every new version).
    the fact:
    after wineprefixcreate, as usual, i execute winecfg for the last personalization and sound interface selection.
    fortunately and surprisingly, i notice that my home directory AND my desktop directory have completely screwed up permission. they was set to 777!!! aargh!
    my home desktop is not so critical mission but i think this is not good!!! 
    after some test, i can say, in this my strange personal experience, that it's winecfg fault. wineprefixcreate don't change any permission. this happen only after the first winecfg execution AND only the first time. following execution of winecfg does not trigger the fault.
    googled anywhere but it seems that i'm the only one in the world with this wine strange behavior. Is it true? any else?
    a little report of my config:
    (multi device are all raid5)
    /dev/sda2    ext2     /boot
    /dev/md0     ext3    /
    /dev/md1     ext3    /home
    ... other devices in irrelevant mount point.
    not so strange rc.conf
    untouched /etc/skel
    not so strange gnome DE on top of GDM
    not so strange any else 
    thanks in advance and good arching

    Solved in another Thread

  • How do I change TimeStamp from US server to UK time

    Hello,
    I am based in the UK. My hosting company is based in the US. I am using a MySql database. All the database tables have timestamps that are set to the local machine time.
    I would like to change the timestamp so that it is GMT.
    Can you please tell me how I would go about doing this?
    Is their any code available to enable me to insert the timestamp as a GMT date or do I set the value from the mysql database end.
    Thanks
    Andrew

    Timestamp values in Java (java.sql.Timestamp) are GMT internally (actually, they're implemented as a long giving the number of milliseconds since 1. january, 1970).
    Date values in SQL, on the other hand, are normally stored in the local time zone.
    What you need to do, is tell JDBC what time zone you want the stored values to be in, like this:
    When inserting (using a PreparedStatement):
      stmt.setTimestamp(column, myTimestamp, Calendar.getInstance(TimeZone.getTimeZone("GMT")));When reading back from a ResultSet:
      Timestamp ts = rs.getTimestamp(column, Calendar.getInstance(TimeZone.getTimeZone("GMT")));Now, you know that the timestamp value you've read back from the database does not have any bias to it introduced by the local timezone of the database server. The next step is to represent the Java Timestamp value to the user, and at this stage you may want to specify which time zone you want for the rendered timestamp, like this:
      import java.text.DateFormat;
      import java.text.SimpleDateFormat;
      // convert the Timestamp to a String in a controlled manner
      // see the documentation for SimpleDateFormat for how you specify the format string
      DateFormat df = new SimpleDateFormat("yyyy.MM.dd HH.mm.ss");
      // need to set the time zone, or the server's time zone will be used
      // if you can somehow figure out the time zone where the user is
      // sitting, you may use that instead, to provide dates relative to
      // the user instead of the server
      df.setTimeZone(TimeZone.getTimeZone("GMT"));
      String outValue = df.format(myTimestamp);
      // output the converted value, maybe
      System.out.println(outValue);Similarly, you may use the parse() method of DateFormat to parse a String as a java.util.Date, which may then be converted into a Timestamp.
    The general principles are as follows:
    - internally, Java Timestamps, Dates etc. are stored relative to 1. january 1970, GMT
    - when getting date values into or out of Java, time zones may have to be considered
    - for converting to/from Strings (eg. for UI purposes), use the java.text.DateFormat class
    - for communicationg with an SQL database via JDBC, use the set/get-Timestamp methods with the added Calendar argument
    NB! Please be aware that I didn't actually try to compile this code, so bugs may be present.

  • Password change timestamp attribute in OID 10.1.4???

    It's been suggested to me that release 10.1.4 of the OID would include a timestamp attribute that is updated every time the user changes their password. Does this exist? I know that the modifytimestamp attribute gets set everytime the user changes their password, but this won't work for our purpose because we also have a batch job that pushes account information changes to our OID from a Human Resources Department database, and this batch job can cause the modifytimestamp to be changed.

    Hi,
    you can easily implement this by adding a new objectclass to your users and defining such an attribute "pwdchangetime", in that objectclass.
    Now, to populate that attribute , you will need a post-modify plugin (java plugin). The plugin will run after each successfull password change operation and will update the attribute for that user.
    For an example on how to create such a plugin:
    Oracle® Identity Management Application Developer's Guide
    10g (10.1.4.0.1)
    Part Number B15997-01
    13.6 Java Plug-in Examples
    http://download-uk.oracle.com/docs/cd/B28196_01/idmanage.1014/b15997/java_server_plugins.htm#CHDIIIBI
    BR,
    Octavian

  • Changing timestamps on a bunch of photos

    I just got back from vacation. Half way through the vacation my camera died. I swapped the memory card into my daughters camera and kept shooting. However it looks like the timestamp settings on my daughters camera were set to 2007.
    So when I downloaded into iphoto the pictures that I took with my daughters camera are all over the place.
    I have them still in my last import folder in iphoto. so I have some dates 2007 from my daughters camera and some dated the correct 2010 from my now dead camera.
    Does anyone know how to change the date stamp on a bunch of photos? I cant go through 512 pics manually doing it.
    I was thinking about exporting them to a folder and using 'a better finder rename' but I don't see an option in that utility to change the actual date stamp!
    Can anyone give me some advise?
    Thanks!
    Steve

    Have you looked in the Photos Menu? Batch Change? Adjust Date and Time?
    Regards
    TD

Maybe you are looking for

  • My iMac's iPhoto is crashing on startup on Mountain Lion. Help!

    Since upgrading my daughter's iMac to Mountain Lion from the latest version of Lion last night, it's crashing on startup every time. This happens even if I unmount the drive that has my photo library on it or try to start it in recovery mode to repai

  • Does the Time Capsule work without LAN

    Ok so I'm looking at buying a Time Capsule, not sure which generation but it has 1Tb of storage, becuase the macbook air only has like 60GB SSD, and i'm wondering whether it all just works over WiFi, and i don't mean does it back up over WiFi I mean

  • Forms Web - Icons not showing up

    Hello, I'm running a form on the web, and I have several iconic buttons. The Oracle Developer 2000 book says that icon image files must be in .gif format, and must reside in the same directory as the html page. So I converted my icons to .gif and pla

  • In process inspection related with PRT maintenance

    Hello SAP QM gurus, I have one issue of In process inspection related with maintenance of PRT. The detail is as follows. I have an inspection plan for SFG (Semi Finished Goods) with 15 parameters to check. For production of this SFG material we are u

  • Blank cdr and dvdr not being "detected"

    I can insert a DVD or CD with data on it, But when I put in a cd/dvd with nothing on it none of my burning applications detect that its in there. Also, nothing in thunar is shown about it. I have not been able to find anything on the forums about thi