File permissions problem

I'm trying to organise permissions on my server. I have a bunch of .iso files which I mount over nfs but it seems as though no matter what I do, the owner and group permissions are ignored.
Obviously I'm mounting as root. The files are owned by root but I can only mount them when the other permissions are set to rw-. Doesn't seem to matter what the owner and group permissions are set to.
What am I doing wrong?
edit:
I'm guessing root runs mount but mount is actually run as something else?
Last edited by sand_man (2010-01-21 11:28:13)

Hmm it is strange. I can mount an iso locally where root has no permissions at all.
Makes no sense to me. There must be a reason why "other" has to have write permission when mounting over nfs
Is it the network group one needs to be in? I'll give it a try
edit again:
I think I might just mount the iso on the server and export that. Its essentially the same thing and I'm the only one using it so it won't matter anyway.
Last edited by sand_man (2010-01-22 01:44:02)

Similar Messages

  • Shared File Permissions Problem

    Since upgrading the Mavericks I constantly have file permissions problems when I tranfer files between computer.  Let me see if I can clarify the problem procedurally.
    1. I have a shared directory that I set to Read&Write privileges for Admin, (me), and Everyone.
    2. I clicked the cog to apply the changes to all the enclosed items. Perfect... everything contained within the directory was changed.
    3. I went to my other Maverics computer and connected to this shared directory using SMB, AFP, connect to server command-k, and using the shared feature on the finder window, which asked me to authenticate when I make the connection. I logged in with the admin account  to make sure I absolutely had full privileges.
    4. I transferred a file to the shared directory and it ended up with the privileges of only (me) RW and Everyone as No Access. It dropped every other set of privileges that were in the directory and set Everyone to No Access, which is a major problem since it serves the files to the web server. I checked the Sharing preferences in the System Preferences. Sure enough all groups are set to Read and Write.
    The shared directory in Terminal says the privileges are drwxrwxrwx+ so it should retain those privileges for any file I place in that directory, but it doesn't.
    This is a new problem to Mavericks. When I used OS 10.7 and 10.8 and chose the get info option to apply the permissions to all enclosed files it stayed that way for any file I inserted into the directory. Now you have to constantly change file permissions even going from Mavericks-to-Mavericks computers.
    Does anyone know how to retain the file permissions for a shared directory when new files are placed in the directory?

    see Topic: Office (2004 & v.X) can't save to AFP volumes properly
    Apple wants you to enable ACLs even if your not using them. See my posting dated April 14

  • Windows file permissions problems

    We have an Xserve G5 that was running Server 10.3. I upgraded it directly to Server 10.5. Since then, I am having problems with some of our Windows users.
    When they create a new folder, it puts them as the owner, but gives them NO rights. I am using ACLs to give full rights to the group that needs access, and also setting the POSIX group rights to read/write. So once they leave that folder, they can no longer get back in. I have SMB set to inherit rights from the parent, and the ACL is set to inherit as well. Other people in the group can access the folder, just not the owner! I change the owner permissions and all is well (for that folder at least). How do I need to set SMB so it follows the inheritance I set?
    Once I have the folder set correctly, any new files created there have the POSIX group set to read only. The ACL inherits properly and still has full control. The owner is set correctly, usually. It is not consistent.
    Once someone creates a file in any folder, if a Windows user modifies a file someone else created, it changes the owner name and gives them no rights. It also creates a new ACL record. If the original owner was a Mac user, it creates a new explicit ACL with all rights except execute and delete. If the file has ACL records already, it duplicates them and gives whatever rights it feels like (it seems). One new record may say Allow Delete only, and the next one say Allow Read except for execute. The only thing for certain is it will never match the original ACL. It always adds the new ACLs at the top of the list, and the duplicates are grayed out as if they were actually inherited that way. The most 'popular' file I've found so far had 128 "inherited" ACL records!
    It is also denying access to some folders that the user has the correct permissions for. For instance, I can create/modify/delete files logged in on the Mac side, but when I log in on Windows, I have problems accessing files/folders. It shows everything as read only. Even if I change the properties in Windows, it will revert back to read-only when I apply the change.
    We have a new Xserve that we will be moving the file services to. At that time, all the Windows users will be moved completely to the Mac side - currently the Windows users are accessing the Xserve and a Novell server.
    Thanks in advance for any help.

    Hi Thy,
    Based on my research, the Trusted Installer is a service, for those resources which only allow Trusted Installer to modify, neither Administrator nor System can modify them.
    I am wondering that how secure the network and physical environment is that you need to create a GPO to prevent users making permissions changes on system files. These system files normally only can be modified by Administrators,
    System or Trusted Installer, which is secure enough when we don’t add users we don’t trust enough to Administrators group.
    >What is the best way to undo this while leaving the audit failures turned on and still retaining the correct permissions on all the files?
    As long as administrators on these machines are qualified, you can remove the Group Policy. If not, please don’t make any user you don’t trust as Administrator.
    >What happens to the files that aren't owned trustedinstalled than now have the trustedinstaller default permissions under system32 and syswow64 if I were to remove the gpo?  What file  permissions would be retained?
    We should keep the default permissions, if those files weren’t owned by Trusted Installer before, we should change the original owner back, vice versa.
    Here are some related articles below I suggest you refer to:
    New ACLs Improve Security in Windows Vista
    http://technet.microsoft.com/en-us/magazine/2007.06.acl.aspx
    SYSK 277: How-To Bring Back the TrustedInstaller
     http://blogs.msdn.com/b/irenak/archive/2007/01/30/sysk-277-how-to-bring-back-the-trustedinstaller.aspx
    Best Regards,
    Amy

  • File Permissions Problem - Multiple Network Users

    My wife & I have a home office network setup for our business, and are having trouble with shared files over the network. We're both on Macs, and all of our client files reside on an internal hard drive in my Mac Pro. I've set her up as a "Sharing Only" user on my computer (which matches the username & password of her account on her iMac), and have properly setup file sharing in both the System Preferences, and in the directory itself that we want shared. I've also applied the permissions to all files & folders below the main folder, and she can view, open and save whatever she needs and it works great.
    *Here's where the problem comes in...* If either of us create a NEW file or folder, the other person doesn't have WRITE access to it (we can browse and open it fine). The second I go to update a file she created, it won't let me over-write it, and I have to go into the permissions for that specific file and give myself Read/Write access. I've experimented with "Groups", and assigned both of us a special group, and applied that group access to that directory, but it doesn't make any difference when a NEW file or folder is created - it doesn't copy the parent directory permissions to itself, it makes one of us the owner, and nobody else has access.
    Is there any way around this? We're both constantly creating new files, and it really hampers our workflow to have to keep re-applying file permissions every time one of us creates something new. Ideally, any new files created within that main client folder would automatically have the same permissions as the parent directory. Any help would be greatly appreciated! Thanks!!

    you can keep those files on a separate partition on the hard drive and turn off ownership for that partition.
    the only other way i know how to deal with this is using inherited ACLs.
    run the following terminal command from your account on the mac pro.
    chmod -R +a "username allow delete,chown,list,search,add_file,\
    addsubdirectory,delete_child,file_inherit,directoryinherit" /path/to/shared/folder
    put your short username instead of username in the above. also, instead of /path/to/shared/folder put the unix path to the folder you are sharing. you can get this path by dragging that folder to a terminal window.
    repeat the command with your wife's username instead of yours.
    warning: this will work with newly created files in the shared folder and with the files you COPY to that folder. it will not work with files that you MOVE to that folder.
    Message was edited by: V.K.

  • Recurring file-permissions problems

    A problem has abruptly appeared and keeps (unpredictably) recurring.  When I edit a file and then save the modified version of that file, something breaks and when I try to reopen the file, later, I get a "you do not have permission to open this file" message. And the file can't be opened.
    If I restart my MacBook Pro, the problem will usually disappear for a while, then begins to pop up again.
    I've been running Mountain Lion since shortly after it was introduced. This is a new problem (never encountered it in 25 years with Macs; this began a few days ago) and has me baffled.

    Back up all data now.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
    Be sure to select the whole line by triple-clicking anywhere in it. You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning. If you don’t have a login password, you’ll need to set one before you can run the command.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select Utilities ▹ Terminal from the menu bar. A text window opens.
    In the Terminal window, type this:
    resetpassword
    That's one word with no spaces. Then press return. A Reset Password window opens. You’re not going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    When that's done, launch Disk Utility and repair the permissions of the boot volume.
    Select  ▹ Restart from the menu bar.

  • Project 2010 Trial - Enterprise Global File permissions problem

    Hi,
    I recently installed Project 2010 Server Trial version. The web fronted work but when i try with Project 2010 Profesionnal client, i got this error message :
    "No permissions to read Project Server Enterprise Global File.
    The Project Server Enterprise Global could not be accessed. Contact your Administrator."
    Anyone can help me ?
    Regards

    i have faced similar issue in Project Server 2013, and while troubleshooting the problem, i have found in the event logs the following error on the application server take place while trying to access the PWA with the Project Pro.
    Application log Error with ID 8306 and Task Category Claims Authentication:-
    An exception occurred when trying to issue security token: ID 3242: The security token could not be authenticated or authorized..
    Resolution at my side:-
    while troubleshooting it seems that resting IIS @ the WFE server solved the issue.
    wish that it helps.
    thx
    Karim El Zarka, MCTS Sharepoint 2010 , MCITP SharePoint Administrator 2010 Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Mark
    As Answer

  • Mac to Mac file sharing - file permissions problem upon newly created files

    Hi all,
    At home I have two iMac's both running Snow Leopard.
    iMac A/Users/*1 is sharing his iMac A/Users/*1/Documents folder.
    The sharing & permissions - preferences of this folder and the files inside this folder are:
    '*1' : (the iMac A's main user account) : Read & Write
    'share' : (a Sharing Only account, set up from iMac A) : Read & Write
    everyone : : No Access
    iMac B/Users/*2 is able to read & write to this folder because he is connected with iMac A as 'share'.
    So far so good. iMac A/Users/*1 can read & write to his own Documents folder
    and so can iMac B/Users/*2 because he is connected to iMac A as 'share'.
    But: this only applies to the folders and files that are _already in_ the iMac A/Users/*1/Documents folder,
    because I once changed the sharing & permissions -permissions of iMac A/Users/*1/Documents as mentioned above and executed 'Apply to enclosed Items...'.
    So the problem is: when I create a new file or folder on iMac A/Users/*1 or on
    iMac B/Users/*2 and put it in iMac A/Users/*1/Documents, this new file or folder will only
    have the standard sharing & permissions - preferences of any newly created file or folder
    on the iMac X/Users/*Y it was created. The problem is those sharing & permissions - preferences
    will not let the other iMac X"/Users/*Y" Read & Write to this new file or folder but only let himself
    Read & Write. Following, the other iMac X"/Users/*Y" will only be able to Read the newly created
    file or folder, because the standard standard sharing & permissions - preferences on
    iMac A/Users/*1 as well as on iMac B/Users/*2 are the following:
    '*Y' : (the iMac X's main user account) : Read & Write
    staff : (Administrator accounts on iMac X) : Read only
    everyone : : Read only
    A pretty manual fix to this problem is walking to iMacX" and changing the
    sharing & permissions - preferences of the newly created file or folder so that iMacX"
    will also be able to Read & Write this newly created file or folder.
    Does anyone know a better fix for my problem? Basicly I want to have Read & Write
    sharing & permissions on the newly created file or folder for both iMac's,
    not only the for the file or folder creator's iMac. And this without having to change
    sharing & permissions - preferences of this newly created file or folder manually
    each time.
    Thanks in advance,
    Vincent Verheyen.

    Hi all,
    I have found a thread wich i think also handles about my problem.
    The standard sharing & permissions - preferences or privileges
    can be changed apparently, this seems to have got something to do
    with umask and changing this umask. The adress is the following:
    *http://www.macosxhints.com/article.php?story=20031211073631814*
    Other ways to change the above-mentioned umask may be
    applications like SharePoints, TinkerTool or BatChMod.
    All of them are also mentioned in the above-mentioned thread.
    I haven't executed the solution as mentioned in the above-mentioned
    thread yet, replies to the thread speak about insecurity and failures.
    Further more I haven't found any other solutions to my problem,
    so any help is still greatly appreciated.
    Thanks in advance,
    Vincent Verheyen.

  • CIFS File Permissions Problem

    Has anyone else experienced this?  I have a remote site setup using a WAAS 574 in inline mode (connected to a 2811 router) and whenever I enable the CIFS Accelerator on the device (and the Central Office WAAS) the remote site end users start gaining access to each other’s files?  Not all of them, just files that someone else was accessing recently.  It seems like the CIFS Accelerator has recently accessed files cached and doesn’t check the User rights on Active Directory for some reason.  I have CIFS disabled for now but I would love to re-enable it.  FYI – The File Server being accessed is a MS Windows 2008 R2 will all Service Packs and Updates installed.

    Hi William,
    Do you know if this is a newly installed server and if Share
    configured on this server are ABE (Access-bases Enumeration). If yes then
    you would need to configure them as dynamic shares in WAAS. See below link.
    http://www.cisco.com/en/US/docs/app_ntwk_services/waas/waas/v431/configurati
    on/guide/filesvr.html#wpxref89338
    Thanks
    Ahsan

  • Weird Locked Files/Permissions/Dock/Etc

    I have some sort of odd locked file/permissions problem (I think).
    About a year ago, I seem to have done something to my permissions or locked files that I can't seem to fix.  I have a variety of disparate symptoms, including applications that won't work or can't be installed/deleted because support or preference files are locked or can't be changed, a need to repeatedly reauthenticate with a password just to move files from one folder to the next, an inability to turn off file sync for mobile me, dock item changes that go away whenever I reboot, locked files that continually reopen in Preview, having to manually delete and reinstall apps like Preview apparently because of locked preference files, printers that won't work because of locked files until I delete all and reinstall, software that won't run properly or fails to launch at all on double click, etc.
    It is almost like a ghost in the machine problem because the problems are relatively varied.
    I've tried disk utility etc to repair permissions and none of the repairs work (I keep getting the same errors, copied below).  I've tried a complete reinstall of the OS, repair permissions from the OS X restore disk, etc. and nothing seems to help.
    This is happening on a Mac Pro 1,1 (3.0 GHz), running 10.7.4 with all updates through today and with a Radeon 4870 card, and 9 GB of properly matched ram.  Everything else works pretty well and I have no similar problems on my wife's 2011 iMac, my MacBookAir i5, etc.
    I'm thinking that there is some sort of locked file or permissions problem that is not getting fixed correctly and that there might be some trick to fixing it.
    Help!!
    Repairing permissions for “Master”
    ACL found but not expected on “Library/Printers”
    Repaired “Library/Printers”
    ACL found but not expected on “private/etc/apache2/users”
    Repaired “private/etc/apache2/users”
    ACL found but not expected on “Library/Printers/PPDs”
    Repaired “Library/Printers/PPDs”
    ACL found but not expected on “Library/Printers/PPDs/Contents”
    Repaired “Library/Printers/PPDs/Contents”
    ACL found but not expected on “Library/Printers/PPDs/Contents/Resources”
    Repaired “Library/Printers/PPDs/Contents/Resources”
    ACL differs on “Users”
    Repaired “Users”
    ACL found but not expected on “private/var/root”
    Repaired “private/var/root”
    ACL found but not expected on “private/var/root/Library”
    Repaired “private/var/root/Library”
    ACL found but not expected on “private/var/root/Library/Preferences”
    Repaired “private/var/root/Library/Preferences”
    Permissions repair complete

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Back up all data now. Before proceeding, you must be sure you can restore your system to its present state
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the Recovery screen appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • Getting authorization error message: Required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed.

    I have recently purchased this MacBook used and am trying to authorize it on the iTunes Store but even after uninstalling iTunes and re-installing it with a fresh copy I'm getting this error message: "The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed."  And I have no idea of where or how to fix this issue.  Any help or suggestions will be greatly appreciated.  I even tried to deauthorize this computer and got the same error message.  HELP!

    I used Terminal to change the permissions on the folder in question.  I followed the instructions in this article:
    iTunes: Missing folder or incorrect permissions may prevent authorization
    In my case, the folder was there, so I needed the command to change permissions on the folder, not to create one.   I was hesitant to use Terminal b/c I know that if I made an error I could wipe out my hard drive or render my computer unusable.  So to be SURE I didn't make an error, I carefully copied the command from that page and *pasted* it into Terminal.  Also, before I could do anything in Terminal, I had to go change my admin password (it had been a blank password before and that's not acceptable for making changes in Terminal).  I was just super careful when entering my password or doing anything else while Terminal was open (making sure I didn't accidently hit the spacebar or another key, etc.)  And it fixed the problem right away.
    What was confusing for me was that the iTunes error message said to change permissions in the FINDER, which is what I was trying to do.  It didn't mention Terminal.  What would really be helpful is if Apple included a link to a page like this in their error message.

  • Live Data / Problem with file permissions

    Just trying out an old version of Dreamweaver MX 2004. I am
    using my webhosting service for remote server/testing server
    duties. It is running PHP 4.3.10 and MySQL 3.23.58. I was able to
    set up the database connection and test-retrieve a recordset with
    no problems. In following the tutorial I found that Livedata
    wouldn't work, it just giving me a warning about file permissions
    being wrong. It turns out that when Dreamweaver creates a temporary
    file of the work-in-progress to upload to the remote server the
    file is created on the server with owner=rw, group=rw, world=r
    which explains why it won't run - group has to be set to group=r.
    The file is created on the fly and then immediately deleted by
    Dreamweaver so it is impossible to manually set the permission on
    the server and probably fairly pointless too.
    I tried just saving the file and previewing in the browser
    which again causes it to be uploaded to the remote server. The
    first time this resulted in the browser offering a file download
    box instead of running the page. The reason is - again - that
    Dreamweaver is setting the uploaded file permissions to include
    group=rw. If I manually set the permission for group to group=r it
    runs fine.
    It turns out that Dreamweaver is always setting the file
    permissions on file uploads (checked php and html) to the
    remote/testing server to include group=rw. Once I set it manually
    on the remote/testing server to group=r for a php file everything
    is fine and subsequent uploads of the same file do not change it
    again.
    I checked with the webhosting company and their second-line
    have reported back to me that the default file permission they set
    on uploaded files includes group=r so it must be DW that is causing
    the problem by setting group=rw the first time. I confirmed this by
    using WS-FTP to upload the same file (renamed) to the same target
    directory and the permissions set were owner=rw, group=r, world=r.
    So
    Can anyone please tell me how to change the permissions DW
    sets on files written to a remote server because I have spent
    countless hours on it without success. From looking at other posts
    in this forum it could be that other users are hitting the same
    kind of problem with DW8

    Stop using Live Data with a hosting account. Set up PHP and
    MySQL locally on
    your machine. That is how it's supposed to work. You
    shouldn't test files on
    the fly on a host as you write them. Change your test account
    in DW to use
    the local server. Upload your files to your remote server
    after they are
    fully tested.
    Tom Muck
    http://www.tom-muck.com/
    "nigelssuk" <[email protected]> wrote in
    message
    news:[email protected]...
    > Just trying out an old version of Dreamweaver MX 2004. I
    am using my
    > webhosting
    > service for remote server/testing server duties. It is
    running PHP 4.3.10
    > and
    > MySQL 3.23.58. I was able to set up the database
    connection and
    > test-retrieve a
    > recordset with no problems. In following the tutorial I
    found that
    > Livedata
    > wouldn't work, it just giving me a warning about file
    permissions being
    > wrong.
    > It turns out that when Dreamweaver creates a temporary
    file of the
    > work-in-progress to upload to the remote server the file
    is created on the
    > server with owner=rw, group=rw, world=r which explains
    why it won't run -
    > group
    > has to be set to group=r. The file is created on the fly
    and then
    > immediately
    > deleted by Dreamweaver so it is impossible to manually
    set the permission
    > on
    > the server and probably fairly pointless too.
    >
    > I tried just saving the file and previewing in the
    browser which again
    > causes
    > it to be uploaded to the remote server. The first time
    this resulted in
    > the
    > browser offering a file download box instead of running
    the page. The
    > reason is
    > - again - that Dreamweaver is setting the uploaded file
    permissions to
    > include
    > group=rw. If I manually set the permission for group to
    group=r it runs
    > fine.
    >
    > It turns out that Dreamweaver is always setting the file
    permissions on
    > file
    > uploads (checked php and html) to the remote/testing
    server to include
    > group=rw. Once I set it manually on the remote/testing
    server to group=r
    > for a
    > php file everything is fine and subsequent uploads of
    the same file do not
    > change it again.
    >
    > I checked with the webhosting company and their
    second-line have reported
    > back
    > to me that the default file permission they set on
    uploaded files includes
    > group=r so it must be DW that is causing the problem by
    setting group=rw
    > the
    > first time. I confirmed this by using WS-FTP to upload
    the same file
    > (renamed)
    > to the same target directory and the permissions set
    were owner=rw,
    > group=r,
    > world=r.
    >
    > So
    >
    > Can anyone please tell me how to change the permissions
    DW sets on files
    > written to a remote server because I have spent
    countless hours on it
    > without
    > success. From looking at other posts in this forum it
    could be that other
    > users
    > are hitting the same kind of problem with DW8
    >

  • Problem with file permissions

    Hello all,
    I am making a simple HttpServlet, which takes input
    from html page and saves in to a file, but I'm having a
    bit of a problem with file permissions.
    I'm getting the following exception
    java.security.AccessControlException: access denied (java.io.FilePermission ./data/result read)
         java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         java.security.AccessController.checkPermission(AccessController.java:427)
         java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         java.lang.SecurityManager.checkRead(SecurityManager.java:871)
         java.io.File.exists(File.java:700)
         SyksyHTTPServlet.doPost(SyksyHTTPServlet.java:31)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)The exception seems to occur when I'm trying to check whether the file already
    exists or not.
    The data directory has all permissions (read, write and execute) set for all users,
    and I have made an empty file called result inside the data directory for testing.
    This file has read and write permissions enabled for all users.
    Here's my code
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.Enumeration;
    import java.util.List;
    import java.util.ArrayList;
    public class SyksyHTTPServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              int totalCount = 0;
              List list;
              String song = request.getParameter("song");
              PrintWriter out = response.getWriter();
              File file = new File("./data/result");
              if(file.exists())  // this is line 31, which seems to cause the exception
                   list = readFile(file);
              else
                   file.createNewFile();
                   list = new ArrayList();
              list.add(song);
              writeFile(file, list);
              for(int i = 0 ; i < list.size() ; i++)
                   out.println(list.get(i));
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              doPost(request, response);
         private List readFile(File file)
              List list = null;
              try
                   FileInputStream fis = new FileInputStream(file);
                   ObjectInputStream ois = new ObjectInputStream(fis);
                   list = (ArrayList)ois.readObject();
                   ois.close();
              catch(Exception e)
                   e.printStackTrace();
              return list;
         private void writeFile(File file, List list)
              try
                   FileOutputStream fos = new FileOutputStream(file);
                   ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(list);
                   oos.flush();
                   oos.close();
              catch(Exception e)
                   e.printStackTrace();
    }I'm using Tomcat 5.5 on Ubuntu Linux, if that has anything to do with this.
    I'll appreciate all help.
    kari-matti

    Hello again.
    I'm still having problems with this. I made
    a simple servlet that reads from and writes
    to text file. The reading part work fine on my
    computer, but the writing doesn't, not even
    an exception is thrown if the file exists that
    I'm trying to write to. If I try to create a new
    file I'll get an exception about file permissions.
    I also asked a friend of mine to try this same
    servlet on his windows computer and it works
    as it should.
    Here's the code
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class ReadServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              String s = "";
              PrintWriter out = response.getWriter();
              String docroot = getServletContext().getRealPath( "/" );
              out.println("docroot: "+docroot);
              File file = new File(docroot+"test.txt");
              if(file.exists())
                   s = readFile(file);
                   out.println(s);
              else
                   out.println("file not found");
                   //file.createNewFile();                    // causes exception
                   //out.println("new file created.");
              writeFile(file, "written by servlet");
              out.println("Now look in the file "+file.getPath());
              out.println("and see if it contains text 'written by servlet'");
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              doPost(request, response);
         private String readFile(File file)
              FileInputStream fis = null;
              BufferedInputStream bis = null;
              DataInputStream dis = null;
              String s = "";
              try
                   fis = new FileInputStream(file);
                   bis = new BufferedInputStream(fis);
                   dis = new DataInputStream(bis);
                   s = dis.readLine();
                   fis.close();
                   bis.close();
                   dis.close();
              catch(Exception e)
                   e.printStackTrace();
              return s;
         private void writeFile(File file, String s)
              FileOutputStream fos = null;
              BufferedOutputStream bos = null;
              DataOutputStream dos = null;
              try
                   fos = new FileOutputStream(file);
                   bos = new BufferedOutputStream(fos);
                   dos = new DataOutputStream(bos);
                   dos.writeChars(s);
                   fos.flush();
                   bos.flush();
                   dos.flush();
                   fos.close();
                   bos.close();
                   dos.close();
              catch(Exception e)
                   e.printStackTrace();
    }And if someone wants to test this servlet I can
    give a war package.
    Any advices?
    kari-matti

  • Problem with file permissions in Windows shares

    Due to a company merger we are now supporting a group of Macs in our PC environment. These Macs connect to our Windows shares. This generally works well, however we have discovered a problem. It’s to do with the way our Macs interact with our Windows shares. When they copy a file to a windows share they take the permissions for the file they copy from the route of the share rather than from the subfolder the files are copied to and write the file permissions accordingly.
    This only affects admin users who use Macs with the ability to change file permissions. Everyone else inherits the permissions from the subfolder as they should because their account can’t change the permissions. If the route and subfolder permissions are the same then there is no change. If they are different, the Mac will use the share route permissions as preference.
    We have shares where users don’t have access to the route folder but do have access to other folders. This is so that they can’t change the top level folder structure. However they are able to create folders and files under the top level folders. If an administrator uses a Mac, no one has access to any files or folders they create because users don’t have access to the route folder and this is copied to the files and folders they create. This doesn’t affect our PC’s only the Macs.
    We are using the latest Mac OS fully updated and Windows 2008 server. Is this a normal Mac ‘Feature’? Is there a work around?

    I’m a bit disappointed by the lack of response to my problem. As Windows is the predominant file server in business, this problem must have occurred before.
    Are Mac people really saying that Macs are not designed to connect to networks? At the moment our Macs are unusable apart from a few isolated tasks. Basically they are used by a few designers who work in isolation. If PC’s had this problem no one would buy them.

  • I can't sync my macbook air with my ipad, problems with authorization... this keeps cropping up: "The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permi"

    Help, cannot sync completely with my ipad, and i also cannot remove or delete shared photos which are clogging up my ipad 64GB memory! Some issue with this keeps croppin gup, so frustrating:
    "The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed."
    Not sure how we can correct his permissions problem, and whether authorising or deautorizing makes any difference, with more and more errors keep popping up, this got to be such after an update of the OS, can remember which!?
    HELP!!!

    follow this:
    Launch iTunes
    select iTunes Store from the menu on the left side.
    sign in via the link on the top right area if you haven't done so already
    click the link where you Apple ID email appears, enter your Apple ID password, click View Account, this will take you to a page displaying detailed information about your Apple ID account.
    The last item under Apple ID summary should be Computer Authorisations, click Deauthorize All
    now reauthorize any computers as needed when the system prompts you.
    good luck.

  • I am trying to back up my new iPhone after downloading/updating iTunes with iCloud. I get this message: The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permiss

    I am trying to back up my new iPhone after downloading/updating iTunes with iCloud. I get this message: The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permiss
    how do I find the file and replace it or install it?

    I'll reload it tonight when I get home...basically, I bought a new iPhone and downloaded some new medical apps. also had to download an update for iTunes into my mac laptop so I could access iCloud (which was NOT on my prior iTunes software)
    When I synched my new iPhone with the newly downloaded iTunes, I registered my iphone and tried to "back it up" to iCloud and the message indicating that "the required file was not found or has a permissions error...." popped up.
    How do I correct the permissions error, or...am I able to do this somewhere? Or...how do I find the file that is missing?
    Dr. Bob001

Maybe you are looking for

  • Extra Blank Line gets added at the Beginning of the file by File Adapter...

    Hello All, I have created an RFC to File Adapter scenario in PI 7,1 and I am using Content Conversion in the File Adapter to convert the payload structure to flat text file. The input Structure is simple as follows: <File> <FName>some file name</Fnam

  • IMac G5 & G3 Connected - No Interent!

    I've got a wireless ADSL router which connects my G5 wirelessly and my G3 by cable. However when I logon the internet more often than not - will not connect to internet. Internet Connect says I am connected and shows IP and signal ect. Router Base sa

  • Home page in internet explorer

    Can anyone tell me why it is that when i open internet explorer the homepage is blank? I have to refresh the page to get the homepage to appear?

  • Message erreur telechargement livres en ADE

    Lorsque je veux télécharger des livres en ADE depuis la FNAC sur mon PC, je reçois de la FNAC le message d'erreur suivant : <?xml version="1.0"?>    <error data="E_ADEPT_RESOURCE_DOES_NOT_EXIST http://acs4.shortcovers.com:8080/fulfillment/URLLink.acs

  • What is the 3.6gb of "other" on my iPhone 4?

    Does anyone know what it is taking up all that space and if there is anyway of reducing it?