File.setLastModified doesn't work for files with another owner and 777 perm

import java.io.File;
public class Main {
    public static void main(String[] args) {
        File file = new File(args[0]);
        System.out.println("exec:" + file.canExecute());
        System.out.println("read:" + file.canRead());
        System.out.println("write:" + file.canWrite());
      System.out.println(file.setLastModified(System.currentTimeMillis()));
} Compile it to ~. In ~ create file aaa.txt. Next
~ $ sudo chown root:root aaa.txt
~ $ sudo chmod 777 aaa.txt Checking
~ $ ls -la aaa.txt
-rwxrwxrwx 1 root root 472 2009-11-24 12:09 aaa.txt Running application
~ $ java -Djava.security.debug=all Main /home/jfreem/aaa.txt
scl:  getPermissions ProtectionDomain  (file:/home/jfreem/ <no signer certificates>)
sun.misc.Launcher$AppClassLoader@1c78e57
<no principals>
java.security.Permissions@1186fab (
(java.lang.RuntimePermission exitVM)
(java.io.FilePermission /home/jfreem/- read)
scl:
exec:true
read:true
write:true
false setLastModified return false and modification time of file remain the same. Why?

Can you see if the file is getting to the webserver's (not
ColdFusion)
temp file directory?
When a file is uploaded from the browser the
webserver(IIS|Apache|etc)
upload it to a temp location, then all CFFile does is copy
the file
from the temp directory to where ever specified.
So you can see if the problem is failing before or after this
point.
Grant wrote:
>
>
> We are migrating our intranet from ColdFusion 5 on
Solaris to ColdFusion MX 7
> on Linux and I'm testing out the existing applications
on the new server. The
> processing page for a file upload is using CFFILE with
ACTION="upload". The
> page finishes processing fine, no error, and continues
as if it was successful
> but the file never actually gets to the destination
directory. I tried with
> larger files and it did take longer (so the file
appeared to get transmitted),
> but it still does not get saved to the server's file
system. This all works
> fine on the current system running CF5. I've tried the
CFFILE destination with
> and without a slash at the end - no difference. We have
ColdFusion 7.0.1
> installed. Hot fix 2 has been applied but that did not
fix the problem.
>
> Any ideas?
>

Similar Messages

  • How come File.separator doesn't work for URLClassLoader as a directory?

    I set as a URLClassLoader URL something like:
    File f = new File("xxx.jar");
    URL url = new URL("file","",f.getCanonicalPath() + File.separator);
    URLClassLoader urlc = new URLClassLoader(new URL[]url,getClass().getClassLoader());
    The problem is, the "platform independent" File.separator does NOT seem to be used by URLClassLoader in the Windows env where \ is the separator. The URLClassLoader says anything that ends with / is a dir, otherwise its treated as a .jar file. Is this a possible bug with URLClassLoader in that it should recongize the File.separator as the end character for a directory? I think it should. Seems to me / is unix/linux, and \ is windows. So if I am running on windows, for URLClassLoader to see a directory, I end up with something like c:\path/ which seems odd.

    Didn't even think about that. Does file.toURL() return the full canonical path? I'll give it a try though, thanks.

  • My iMessage doesn't work for some with iPhones

    WWhy does iMessage not work for some thst have iPhone? For example day 1 text went as iMessage day 2 changed to sms

    Hi,
    1) That iPhone  may not be registered with the iMessages Servers.
    Several variants of that:-
    2) the iPhone has lost power/is out of range and been "de-registered".
    3) Twice my iPhone has become set to Not Receive on the iPhone Number - the User cannot change this - but it has happened. After a while if this is not spotted it loses the link with the Apple ID as well.
    4) It is not entirely clear if you Block someone in iMessages whether the iPhone still gets SMS versions.
    It appears you might have to block them for Phone  (and therefore related services like SMS) as well as iMessages.
    5) iMessages servers having a bad day.
    9:39 pm      Saturday; April 18, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Block.si doesn't work for me in Firefox 15 and 16 Linux

    Hi everybody,
    I'm about to give to my son a PC with Firefox 15, after installing Block.si I configured it to block adult sites, but it doesn't block accesso to two adult sites I tried, even after restarting Firefox. Same thing with Firefox 16 beta on my PC. Maybe I should revert to to Firefox 14 ?

    Blocksi should work with firefox 15 and 16 on Linux. Can you please check if Controversial category was set to blocked. If page still does not get blocked, can you please send an email with the URL to the [email protected]

  • 'Sort order column' doesn't work for prompt with function

    I turned on the 'sort order column property' in repository for a logic column 'school year', so when I get school year from prompt, it shows desc order. It works fine if th colume in prompt is a simple prompt. But when I add function in the column in prompt (means edit Fx with a case statement), when school year prompt shows in dashboard, it is not sorted in desc order any more, it went back to acs.
    Am I missing something, or this is a bug?
    Another question, when I turn on 'sort order column property' in repository for a logic column, can I choose to desc on another column? I couldn't do it, and had to create another sorting column.
    Thanks,
    Amy

    Cant you create this logic in the rpd and then apply order there and use the newly created column in your prompt..

  • Updated to OS X Maverick and now the keyboard doesn't work. Anyone with similar problem and a solution?

    I recently updated to the OS X Maverick  and the keyboard   just stopped functioning after working fine the first day. Pressing any key just produces a ding, but no mark. Pressing the return key produces a black dot as if you were putting in a confidential password. Has anyone had a similar problem and a possible solution? Thanks. mj-t

    I am having the same problem and its not on every call, its very hit or miss, but very aggrovating. The screen just goes black and the home key nor the power button on top have any affect. Then the locked screen will show but you can't unlock the phone. I have to let it sit for a minute and then I can push the home button and go on in and the call is finally disconnected.

  • When i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    when i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    using microsoft word.
    the hyperlink doesn't work in the pdf file (adobe reader).
    adobe reader xi.
    my operating system windows 8.1.
    the attached screen is appeared.

  • How do you save data into an excel file while myRIO is acquiring data? I tried saving it using "Write to file" but it doesn't work for some reason.

    I am acquiring cosine wave and a pulse wave as input and I want to store their peak to peak values into an excel file. "Write to File" is not working for it. Is there any other vi which can be used for data logging?
    Thank you for your help.

    Hi Ssheoran,
    Can you provide more detail when you say that the Write to File VI doesn't work? Is there an error given? Or can you just not find the file on your computer? Keep in mind using this file in a Real-Time VI on the myRIO will save files on the myRIO. You will then have to transfer to your PC. Please view the following video as a guide for saving files and transferring them to your computer: (http://www.youtube.com/watch?v=BuREWnD6Eno). Hope this helps.
    Best Regards,
    Roel F.
    Applications Engineer
    National Instruments

  • Locate file window doesn't work

    Ok, this problem occures only on our Z800 workstations.
    Everything works as expected on my laptop.
    When I try to relink a media file, the relink media window opens, and then I click the Locate button.
    The new window ALWAYS opens in the top most level (basically My Computer in windows) and not in the last used directory.
    I think it has something to do with the second problem - the path text box doesn't work. Whatever I enter there and click Return - nothing happens. It doesn't navigate to the folder specified in the path field. The only way to navigate is to go throught the folder tree on the left.
    For every file I have to do it always from the top most level - that is a lot of clicking.
    Also if I uncheck Use Media Browser to locate files, the default windows dialog properly navigates to the last known location of the file.
    I know it's an error - since on my laptop everything works fine. The window opens in the last know location of the media file and I can easily navigate using the path field.
    Any suggestions what could be the reason for this?

    Jim Simon wrote:
    I'm not sure if this is a bug.  The Locate File dialog seems to be opening where it thinks the file might be, rather than where it was.  For example, I renamed the 0000.mts file for a particular project, and when I opened Premiere Pro, Locate File went to the 0000.mts file from another project/folder, thinking that might be it.
    So...if you have no other files that might be the missing file, the dialog starts at the top.
    Jim,
    I understand what you are saying in regard to where it thinks it might be. However if I manually type a path where a file I want to link to rathter then clicking 20 times in the folder tree, it throws a "File not accessible" error. Yet if I use the folder tree to navigate to the same file it sees it and links to it fine.
    It just seems that whenever I try to manually type a path in the path address field is when the error occurs.
    Are you able to manually type in a path > hit enter/return and have it link to the file?

  • With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    This isn't an issue. Notice the screen prior to the one that shows usage has an iCloud section and a Manage Storage button. For this button to activate ios needs to download a few kb from icloud. Switching back to this screen forces ios to download those few kb.

  • Hello, can anyone tell me how to share my home macbook pro to my imac in the office? I tried file sharing but never worked for me...appreciate if anyone can help!

    Hello, can anyone tell me how to share my home macbook pro to my imac in the office? I tried file sharing but never worked for me...appreciate if anyone can help!

    I should have added to my posting (instead of using this "reply" -  it is the server passwork it is asking for and I have never known that I had one and assumed it was the passwork I always used for this type of thing.

  • Can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks

    can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks

    See http://kb.mozillazine.org/Links_to_local_pages_do_not_work

  • Symbolic Link doesn't work in 'File Window' on Mac

    Hi, I'm Nao from Japan.
    I'm sorry for my strange English.
    I usually use Dreamweaver CC on Windows7 PC.
    I manage some web sites. Three of them belong to same group. They require some same image files. The three sites are on one remote web server. So I use symbolic link(directory) to share the image files.
    And on my windows PC, I use symbolic link to share the files in the local sites of the three.
    'File Window' of dreamweaver CC (for Win) understands symbolic link and i have no trouble.
    But 'File Window' of dreamweaver CC (for Mac) can't understand symbolic link.
    ('Preview Window' understand symbolic link.)
    How can i solve the issue?

    Thank you for your reply.
    I should explain my situation again.
    at command prompt on windows7,
    c:\webSites>mkdir site_A
    c:\webSites>mkdir site_B
    c:\webSites>mkdir site_A\shared_images
    c:\webSites>mklink /d site_B\shared_images c:\webSites\site_A\shared_images\
    'c:\webSites\site_B\shared_images\' acts right on File Window of Dreamweaver CC.
    If some files are put into the 'c:\webSites\site_A\shared_images\' ,they will appear in 'c:\webSites\site_B\shared_images\' on File Window of Dreamweaver CC.
    but at terminal on Mac OSX,
    MacBookPro:webSites nao$ mkdir site_A
    MacBookPro:webSites nao$ mkdir site_B
    MacBookPro:webSites nao$ mkdir site_A/shared_images
    MacBookPro:webSites nao$ ln -s /(somewhere)/webSites/site_A/shared_images/ site_B/shared_images
    '/(somewhere)/webSites/site_B/shared_images/' doesn't act right on File Window of Dreamweaver CC.
    But '/(somewhere)/webSites/site_B/shared_images/' acts right on 'Finder'.
    And in the 'Design view', the images located in '/(somewhere)/webSites/site_B/shared_images/' are displayed right.
    I am at a loss.

  • I have a problem with my iMac (intel). Youtube doesn't work for almost a year, and now even the flash games (like facebook's games) doesn't work (sorry for my english)

    Hi, i have my iMac from 2008 and it's always work but for almost the lasy year youtube doesn't work. That's wasn't a problem but. right by now, everytime i tried to watch a video the mac start to freeze and i must close all the application which are working and, sometimes, i need to shut down the entire sistem. I tried to reset safari, delete chache and cookies, whatever...but nothing.  What can i do?
    P.S. Even the flash games, like facebook's games doesn't work...they are slow and sometimes they freeze all. Sorry for my english

    Pick and download the latest Flash Player for your OS.

  • Problem with my touch screen. It works for 1 or 2 minutes and then it doesn't work for 2 or 3 minutes !!

    hi everybody
    I have a problem with my touch screen. It works for 1 or 2 minutes and then it stops working for 2 or 3 minutes, this is a loop ! if I don't use for a couple of hours it will work more, about 15 minutes and then stops working !!! whats wrong with may iphone, which part is damaged ?:(
    ( when touch screen stops working, all keys work correctly, home key & others )
    please help me

    oh
    finally problem solved
    the finger touch part was damaged, they replaced it with a new one and now I have my iphone 4g as it was at first, brilliant like always

Maybe you are looking for

  • I cant do the new security thing, what do i do?

    Itunes did a new security thing and i cant buy anything because theres something wrong with it. It keeps saying that it cannot set up the security thing. Nothing is missing or invalid. What do I do.

  • Space utilization of Oracle XDB

    hi, There is a significant difference in the size of .dbf files for USERS tablespace & size of individual tables. Total size of .dbf files is 30 GB approx. Total Table size = 2853 MB 1. Is there a way to find how has Oracle allocated the remaining sp

  • Dump in  REUSE_ALV_LIST_DISPLAY after Upgrade

    Hi All We have gone for upgrade from 4.7 to ECC 6.0 An ALV list report works fine in 4.7 , but its going for Dump in ECC 6.0. Runtime Errors         DYN_TABLE_ILL_COMP_VAL Except.                CX_SY_DYN_TABLE_ILL_COMP_VAL Date and Time          17.

  • DPM 2012 R2 (ID 104 Details: Internal error code: 0x809909FF)

    We are running DPM 2012 R2 on Windows Server 2012 R2 We have a Protection Group:Servers (9 members) where 5 servers always give the same error message, when we try to run a synchronization job with consistency check. With other 4 server everything is

  • Compressor stops halfway - Computer wants to restart

    I have a mid-2006 17" Intel Core Duo iMac with Snow Leopard installed. I'm having problems with Compressor (3.0.5) being able to completely export a 2 and half hour video from Final Cut Pro. Like I said, the film I'm compressing is 2.5 hours of HD vi