[SOLVED] Problems in permissions for accessing files

Hi everyone
let's say I want to copy a folder to /etc/
the problems is my user can't copy files anywhere other then it's home it doesn't even have access to any file or folder other then home.
on the other hand I can use root to view and copy or access but the files that root creates or copies are only for root , I mean other groups or users can't access them .
I tried changing permissions on files ( chmod , chown) but sometimes it takes a lot of time .
can you tell me how I can give my own user those permissions ?(permission of copying file to a folder like /etc/ or creating a file in there )
is there a way to change root's default setting so when i create something with root that file or folder be accessible for others automatically ?!
sorry if my questions are dumb
--N3mo
Last edited by N3mo (2012-11-16 16:49:43)

You can indeed do that. I have no intention of telling you how.
What you are trying to do is dangerous and, frankly, idiotic. I am sure that you are no idiot but your strategy is idiotic. (Smart people often do dumb things.)
If you insist on doing this, you can do it. But you should learn about the security system you are disregarding so that you know the risks. If you do that, you will know how to run those risks if you wish.
What packages are you downloading? Do you mean pacman's cache? Why do you want your user to have write access there?
Note that apart from the general idiocy of this strategy, it will also prevent some programmes from working at all because some of them check for sane permissions and refuse to run if they find the permissions are insane.
I don't even understand why you want to change root's settings. If you are working as root anyway, why do you also want your user to have access?
You can keep themes etc. in your home directory in appropriate places. Then you have complete control of them. You should not be adding additional themes to the system's collection except by installing packages with pacman.
Please learn about the way that the file structure, permissions and access controls are supposed to work and the protection that they offer you. (From yourself as well as other people.)

Similar Messages

  • [Solved] Problems with permissions for a script

    Hi I realize the topic "permissions in Linux" is something that you can find very easily in the internet but I cant seem to figure out a solution for my problem.
    I currently have a working script (taken from the ArchWiki) which enables me to change my display brightness. However I must be either superuser or root to be able to use it since it sends commands to the necessary devices.
    I am currently using fluxbox as "desktop environment" and I want to be able as normal user to change the brightness without calling "sudo" everytime. I have also bound the necessary keys in the fluxbox/keys file to send the necessary commands to the script so my only problem is now with the permission.
    Every help is much appreciated
    Last edited by Triver (2011-12-13 17:34:41)

    ok it works that way (at least when I execute the additional script which contains the sudo command).
    for some reason fluxbox doesnt react when I press the keycode that I looked up with xev (although it works with a combination like "Mod4 b: exec ~/script")
    anyway I think I'll stick with that solution and add some additional commands in the script (like toggle wlan on/off), thx for the quick help
    edit: ok now I'm having difficulties with extending the script
    I want to add additional paramters so the script can be used multifunctional depending on the parameter you launch it with.
    however he seems to think that the String which I want to compare with the parameter is a command.
    here's the code
    #! /bin/sh
    if [$1 = "brightness"]; then
    if [$2 = "up"]; then
    //call the actual brightness script with sudo
    elif [$2 = "down"]; then
    // call the actual brightness scrip with sudo
    else
    echo "invalid parameters!"
    exit 1
    fi
    fi
    exit 0
    I execute the script like this
    ~/script brightness up
    but he only returns me
    ~/script: line 2: [brightness: command not found
    so whats wrong with the code?
    Last edited by Triver (2011-12-13 16:03:07)

  • I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

  • I have problem in quicklook for mp4 files in my mountain lion

    I have problem in quicklook for mp4 files in my mountain lion os 10.8.2 so please help me what i need to do? but i can view mov,3gp,jpeg files problem is only with mp4 files.... any one help me...

    I guess you are calling BDC right after some event which is locking the data or before the commit of previous data could happen. Sometimes data update needs time. You can try using WAIT statement right before it and wait for 1 or 2 seconds and see if it works.
    If it does, I would recommend you to check the lock on the corresponding object and when lock is removed update the data as waiting for 2 seconds for a larger set of data will just make the program a bit slow. Depends on the amount of data though, if it is just one set of transaction, you may use WAIT for 2 seconds.
    Regards,
    Aabhas

  • When setting up permissions for application files--URGENT

    Hello All,
    when setting up permissions for application files,
    Is this following permisson appropriate?
    If application files are owned by a single owner,
    that owner should be the oracle user.
    DN

    Here is my question again.
    when setting up permission for application file, which permission is
    appropriate?
    a) If application files are owned by a sigle owner,that owner should be oracle
    user.
    b) Application files should be owned by oracle user
    c) Application files should be owned by single user.

  • Solved - How to take ownership and change permissions for blocked files and folders in Powershell

    Hello,
    I was trying to take ownership & fix permissions on Home Folder/My Documents structures, I ran into the common problem in PowerShell where Set-Acl & Get-Acl return access denied errors. The error occurs because the Administrators have been removed from
    file permissions and do not have ownership of the files,folders/directories. (Assuming all other permissions like SeTakeOwnershipPrivilege have been enabled.
    I was not able to find any information about someone successfully using native PS to resolve the issue.  As I was able to solve the issues surrounding Get-Acl & Set-Acl, I wanted to share the result for those still looking for an answer.
    Question: How do you use only Powershell take ownership and reset permissions for files or folders you do not have permissions or ownership of?
    Problem: 
    Using the default function calls to the object fail for a folder that the administrative account does not have permissions or file ownership. You get the following error for Get-Acl:
    PS C:\> Get-Acl -path F:\testpath\locked
    Get-Acl : Attempted to perform an unauthorized operation.
    + get-acl <<<< -path F:\testpath\locked
    + CategoryInfo : NotSpecified: (:) [Get-Acl], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetAclCommand
    If you create a new ACL and attempt to apply it using Set-Acl, you get:
    PS C:\> Set-Acl -path F:\testpath\locked -AclObject $DirAcl
    Set-Acl : Attempted to perform an unauthorized operation.
    At line:1 char:8
    + Set-Acl <<<< -path "F:\testpath\locked" -AclObject $DirAcl
    + CategoryInfo : PermissionDenied: (F:\testpath\locked:String) [Set-Acl], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand
    Use of other functions like .GetAccessControl will result in a similar error: "Attempted to perform an unauthorized operation."
    How do you replace owner on all subcontainers and objects in Powershell with resorting to external applications like takeown, icacls, Windows Explorer GUI, etc.?
    Tony

    Hello,
    Last, here is the script I used to reset permissions on the "My Documents" tree structure that admins did not have access to:
    Example:  Powershell script to parse a directory of User-owned "My Document" redirection folders and reset permissions.
    #Script to Reset MyDocuments Folder permissions
    $domainName = ([ADSI]'').name
    Import-Module "PSCX" -ErrorAction Stop
    Set-Privilege (new-object Pscx.Interop.TokenPrivilege "SeRestorePrivilege", $true) #Necessary to set Owner Permissions
    Set-Privilege (new-object Pscx.Interop.TokenPrivilege "SeBackupPrivilege", $true) #Necessary to bypass Traverse Checking
    #Set-Privilege (new-object Pscx.Interop.TokenPrivilege "SeSecurityPrivilege", $true) #Optional if you want to manage auditing (SACL) on the objects
    Set-Privilege (new-object Pscx.Interop.TokenPrivilege "SeTakeOwnershipPrivilege", $true) #Necessary to override FilePermissions & take Ownership
    $Directorypath = "F:\Userpath" #locked user folders exist under here
    $LockedDirs = Get-ChildItem $Directorypath -force #get all of the locked directories.
    Foreach ($Locked in $LockedDirs) {
    Write-Host "Resetting Permissions for "$Locked.Fullname
    #######Take Ownership of the root directory
    $blankdirAcl = New-Object System.Security.AccessControl.DirectorySecurity
    $blankdirAcl.SetOwner([System.Security.Principal.NTAccount]'BUILTIN\Administrators')
    $Locked.SetAccessControl($blankdirAcl)
    ###################### Setup & apply correct folder permissions to the root user folder
    #Using recommendation from Ned Pyle's Ask Directory Services blog:
    #Automatic creation of user folders for home, roaming profile and redirected folders.
    $inherit = [system.security.accesscontrol.InheritanceFlags]"ContainerInherit, ObjectInherit"
    $propagation = [system.security.accesscontrol.PropagationFlags]"None"
    $fullrights = [System.Security.AccessControl.FileSystemRights]"FullControl"
    $allowrights = [System.Security.AccessControl.AccessControlType]"Allow"
    $DirACL = New-Object System.Security.AccessControl.DirectorySecurity
    #Administrators: Full Control
    $DirACL.AddAccessRule((new-object System.Security.AccessControl.FileSystemAccessRule("BUILTIN\Administrators",$fullrights, $inherit, $propagation, "Allow")))
    #System: Full Control
    $DirACL.AddAccessRule((new-object System.Security.AccessControl.FileSystemAccessRule("NT AUTHORITY\SYSTEM",$fullrights, $inherit, $propagation, "Allow")))
    #Creator Owner: Full Control
    $DirACL.AddAccessRule((new-object System.Security.AccessControl.FileSystemAccessRule("CREATOR OWNER",$fullrights, $inherit, $propagation, "Allow")))
    #Useraccount: Full Control (ideally I would error check the existance of the user account in AD)
    #$DirACL.AddAccessRule((new-object System.Security.AccessControl.FileSystemAccessRule("$domainName\$Locked.name",$fullrights, $inherit, $propagation, "Allow")))
    $DirACL.AddAccessRule((new-object System.Security.AccessControl.FileSystemAccessRule("$domainName\$Locked",$fullrights, $inherit, $propagation, "Allow")))
    #Remove Inheritance from the root user folder
    $DirACL.SetAccessRuleProtection($True, $False) #SetAccessRuleProtection(block inheritance?, copy parent ACLs?)
    #Set permissions on User Directory
    Set-Acl -aclObject $DirACL -path $Locked.Fullname
    Write-Host "commencer" -NoNewLine
    ##############Restore admin access & then restore file/folder inheritance on all subitems
    #create a template ACL with inheritance re-enabled; this will be stamped on each subitem to re-establish the file structure with inherited ACLs only.
    #$NewOwner = New-Object System.Security.Principal.NTAccount("$domainName","$Locked.name") #ideally I would error check this.
    $NewOwner = New-Object System.Security.Principal.NTAccount("$domainName","$Locked") #ideally I would error check this.
    $subFileACL = New-Object System.Security.AccessControl.FileSecurity
    $subDirACL = New-Object System.Security.AccessControl.DirectorySecurity
    $subFileACL.SetOwner($NewOwner)
    $subDirACL.SetOwner($NewOwner)
    ######## Enable inheritance ($False) and not copy of parent ACLs ($False)
    $subFileACL.SetAccessRuleProtection($False, $False) #SetAccessRuleProtection(block inheritance?, copy parent ACLs?)
    $subDirACL.SetAccessRuleProtection($False, $False) #SetAccessRuleProtection(block inheritance?, copy parent ACLs?)
    #####loop through subitems
    $subdirs = Get-ChildItem -path $Locked.Fullname -force -recurse #force is necessary to get hidden files/folders
    foreach ($subitem in $subdirs) {
    #take ownership to insure ability to change permissions
    #Then set desired ACL
    if ($subitem.Attributes -match "Directory") {
    # New, blank Directory ACL with only Owner set
    $blankdirAcl = New-Object System.Security.AccessControl.DirectorySecurity
    $blankdirAcl.SetOwner([System.Security.Principal.NTAccount]'BUILTIN\Administrators')
    #Use SetAccessControl to reset Owner; Set-Acl will not work.
    $subitem.SetAccessControl($blankdirAcl)
    #At this point, Administrators have the ability to change the directory permissions
    Set-Acl -aclObject $subDirACL -path $subitem.Fullname -ErrorAction Stop
    } Else {
    # New, blank File ACL with only Owner set
    $blankfileAcl = New-Object System.Security.AccessControl.FileSecurity
    $blankfileAcl.SetOwner([System.Security.Principal.NTAccount]'BUILTIN\Administrators')
    #Use SetAccessControl to reset Owner; Set-Acl will not work.
    $subitem.SetAccessControl($blankfileAcl)
    #At this point, Administrators have the ability to change the file permissions
    Set-Acl -aclObject $subFileACL -path $subitem.Fullname -ErrorAction Stop
    Write-Host "." -NoNewline
    Write-Host "fin."
    Write-Host "Script Complete."
    I hope you find this useful.
    Thank you,
    Tony
    Final Thought: There are great non-PS tools like
    Set-Acl and takeown which are external to PS & can also do the job wonderfully.  It may be much simpler to call those tools than recreate the wheel in pure
    code.  Feel free to use whatever best suits your time, scope & cost.

  • Read-only access permissions for new files/folders?

    System:
    Clean Install on new intel Xserve
    10.4.8 Server w/ Open Directory
    Windows clients can read/write completely fine...
    Clients connecting using AFP (whether Standard or Kerberos authentication) can access files, but when new files/folders are created on the server, they register as full permissions for the user who created them, but not for the rest of the group.
    The share(s) in question are set using POSIX from WGM: Full access for owner/group/everyone (changed it to this thinking it would help, but it does not). Of course, no one can make changes to a newly-created/deposited files/folders, which is just plain silly.
    I can chmod the permissions recursively from a script (which fixes the problem, of course) on a regular basis so that its not (as much of) an issue, but there is still a 5-minute lag for the script to kick in, since we don't want to bombard the server with chmod requests every minute....which is unnecessary in the first place!
    I have plenty of other setups which are identical but have no such issue...
    Any reason why POSIX permissions on the share are being ignored from every user account?
    Thanks,
    k

    "That's default posix behaviour no matter what access permissions you set on the sharepoint."
    I'm afraid this is dead wrong. What matters most is how you set permissions on the share, not if you've chosen to inherit vs. using POSIX. POSIX is still used in inherit functions, though you can use ACL's to override them. In this case, ACL's are not being used on those shares (though we tried it).
    After all, why would Apple (let alone anyone else) even offer the ability to change POSIX permissions on a share if it didn't have any effect? That would be somewhat contradictory in nature.
    Like I said before, I have several other installations which are identically setup that have no such issues.
    As for Windows, it is also not set to inherit permissions; we're setting those explicitly. And they work fine.
    Any other ideas?
    Thanks,
    k

  • Four Users, One Mac - Want all to have permissions for all files

    Our family shares an imac on 10.6.
    I want to set the machine up so all for users have access to all files.
    Is this as simple as going to Get Info for the Macintosh HD and changing permissions for everybody to read and write and then choosing the "for all enclosed..."
    Simple?
    Problems down the road?

    If you are using v7 of iPhoto them working from the Users/Shared folder will not work unless you want to get busy changing ACLs in the Terminal.
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc. The problem here is that OS X works very hard to keep your data safe and secure from the other users. You're trying to beat what's built in to the system. So, to beat the system
    Quit iPhoto in both accounts
    Move the iPhoto Library Folder to an external HD set to ignore permissions. You could also use a Disk Image or even partition your Hard Disk.
    In each account in turn: Hold down the option (or alt) key and launch iPhoto. From the resulting dialogue, select 'Choose Library' and navigate to the new library location. From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.
    Lastly: This method seems a little clunky at first, but works very well. Most importantly, it uses the System to do the job for you.
    Create a new Account on your Mac, call it Media. Create an iPhoto Library there. (BTW: This will work for iTunes too.)
    Enable Sharing on the Library:(Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other accounts. In those accounts, enable 'Look For Shared Libraries'. The Library will appear in the other source pane.
    This means that both users will be able to see the pics. If you want to use a pic then simply drag it from the shared Library to your own in the iPhoto Window. This means that each user can have their own edits.
    If you want to add photos to the Library: Log into the Media account for that purpose.
    To make it all seamless: Set your Mac to log into the Media Account automatically. Set iPhoto to launch on log-in. Then switch to your own account using Fast User Switching.
    Net result: a Library that's permanently available to all users but also protected. Each user can have their own versions of the pics if they want.
    No partitioning, no permissions issues. Uses no extra disk space. What's not to like?
    Regards
    TD

  • Removing ownership & permissions for all files burned to a DVD?

    Hello,
    I am new to the concept of "ownership & permissions". Do they apply to files burned to DVD or just the files on the computer? I would like to burn some files onto a DVD for backup and I do not want to copy the "ownership & permissions" settings of the files - I just need to backup the files only. I would like to back the files up for a year or two and I am concerned that in the future I may not remember my usernames or passwords to access these files from the burned DVD.
    Do "ownership & permissions" apply to files burned onto a DVD? Or does the DVD burning process erase the "ownership & permissions" settings? I tried to burn a DVD from OSX by creating a burn folder and I didn't see any setting that allowed me to remove the "ownership & permissions" settings.
    Thank you for any insite into this.

    Thanks Mulder,
    Here is what I am trying to do:
    I do not need to backup any system files - I already have OSX on my original DVD if I needed to re-install. I only need to backup the users' document files and maybe some email folders in the users' libraries.
    I set up three accounts:
    1. The first account is for admin purposes only.
    2. The second is for my own use - it is the account used most often on this computer.
    3. The third account is for my family.
    Note: I will set up a fourth account for our student renter later.
    I will have access to the user names and passwords of all these accounts in case I need to go into the accounts to back up their documents. But the user(s) of the family account will not have my password - so the kids don't accidently erase any of my files.
    When working in the second account (which is used most often by myself), I sometimes need to place newly created files into the "document" folder on our family account (the third account). And so I purposely changed the "Ownership & Permissions" on the "document" folder on our family account (the third account) to Group: second account. This allows me (the second account) to place files into the "Document" folder of the third account (the family account). After doing this, I also need to change the "Ownership & Permissions" of any added files to Group: third account so the user(s) of the family account can edit (read and write) the files I add from the second account.
    An alternative setup that I decided not to use: I could have made use of the "users/shared" folder for this, however, I do not want everyone to be able to access these files - especially when I set up a fourth account (or even more accounts) in the future. I only would like to share the contents of the third account's "Document" folder between two users (user of the second account and the user of the third account).
    Now I will continue the explanation of my setup:
    Over time the "Document" folder of the third account (the family account) will become filled with a mixture of files with different Ownerships - some created from the second account and some created from the third account - but all editable from either the second account or the third account by assigning each other access via the "Group" designation in "Ownership & Permission". Because of this mix of files with different ownerships, I could, if I wanted to keep the settings consistent, select the "Document" folder of the third account (the family account) and change the ownership of all enclosed items to the user of the third account by using the "Apply to enclosed items". I would probably also change the "Group" designation to the second account too.
    I will be able to make all these changes because I have the user names and passwords for all the accounts.
    Now here is my main question:
    My concern is that when it comes time to backup the document folders onto DVD, what if in a couple years I forget these passwords? You see, I would rather not copy any "Ownership & Permissions" settings of the files onto the DVD. Lets say that in a couple of years I go back to my DVD backup and need to pull off some old jpeg files and put them onto my computer. When I insert the old backup DVD will it say: "Sorry, you do not have access priviledges to view these files" or something like that? That would be a real problem. These are my own files. Why would I want to risk making an important backup DVD un-useable in the future because of some long-and-forgotten permission settings?
    What I would like to do is copy all my files onto DVD for backup in such a way that "Ownership & Permissions" are not copied. Why put the risk of a limitation on your important backups? Is there a better way to do this? What do other people do?
    Am I making this more complicated than it has to be? As you can tell, I am a beginner with OSX (and permissions) and I am looking for some advice. Thanks
    Mulder, when you wrote:
    "If you're trying to backup just selected files, such as your purchased music or applications, etc., then ownership and permissions shouldn't be a problem."
    did you mean that ownership and permissions are not copied? That would be great. But I am not sure if that is what you meant to write. Thanks!

  • [SOLVED] setting up permissions for mounted usb devices

    Hi all,
    I've been having the following problem when mounting my external hd: in order to mount the external hd I created a folder /mnt/usbstick/ giving permissions to a non-root user to read the files/directories in this folder (using chmod); however, after I mount the external hd, the set of permissions for /mnt/usbstick/ change so that a non-root user cannot  read the mounted files in /mnt/usbstick. This is a problem for me because, when I copy a file from the external hd to the non-root home folder, the copied file can only be read by the root user.   
    Do you know how I can solve this problem? Should I write a udev rule and place it at /etc/udev/rules.d/? Or should I simply add the non-root user to a specific group from /etc/group? Any ideas?
    Thanks!
    Last edited by falsum (2010-05-08 09:21:59)

    You could try adding an entry for your usb device in /etc/fstab and specify the option user to let non-superusers mount it.
    Here's an example of an entry for my external HD. I'm sure there are probably other (and better) ways to do this but it works for me.
    UUID=4376-0BFB /media/FIRELITE vfat rw,user,noauto,async 0 0
    Nice howto found on the wiki: http://wiki.archlinux.org/index.php/Fstab

  • [solved] Problem with Amarok and flac-files

    When I installed Arch for the first time a couple of months ago, I was happy to find that some flac-files that didn't play in Amarok on my Debian installation was now played back perfectly. However, upon trying to play these files today, Amarok refuses to play them. I get an error stating that there is no suitable demux plugin for the files. Other flacs play back fine though, and the problem files play back perfectly in mplayer.
    Another thing I would be very happy to resolve is that I have a few files that use japanese in their tags. IIRC these displayed correctly in Amarok on my Debian install, but in Arch all I see is squares where there should be japanese, despite me installing both arphic-ukai and arphic-uming packages. What am I missing?
    All help appreciated!
    Last edited by Emphrygian (2007-04-20 22:36:45)

    Your tip worked like a charm and the files now play perfectly in Amarok once again.
    I solved my second problem by installing the ttf-sazanami package from AUR and adding both sazanami gothic and sazanami mincho as substitute fonts for Sans Serif (my default font) in qtconfig (not sure that I really needed both though, but hey, it works now ).
    Last edited by Emphrygian (2007-04-20 22:35:37)

  • Problem with permissions on old files help?!

    So recently my mac pro hard drive failed and I had to get a new one..fortunately they were able to manually migrate all my data..All my music and production files..vsts and various sound packs..The thing is my last hard drive had a password so now I can see my data from my old hard drive but I do not have permission to open the folders up let alone use them...How do I give my new hard drive the permissions to access/open/use my old data??? I am relatively ok when it comes to computers but not for something like this..I know it has something to do with running the terminal but once I get into that, its basically all charlie brown..Is there anyone out there willing to help a dummy out My files are extremely important and I've invested 1000's of dollars on them..Yes, yes I know now I should have had them on an external but I never thought my macbook hard drive would fail a year after buying it..Please I would really appreciate some help..thanks!!

    I received this warning:warning: SUID file "System/library/coreS...as been modified and will not be repaired.
    It's not really a warning but messages re SUID which according to Apple can be ignored > Mac OS X: Disk Utility's Repair Disk Permissions messages that you can safely ignore
    The SUID mesages in no way are related to the Silverlight plugin issue.
    As for Silverlight go to /Library/Internet Plug-Ins. Make sure you see the Silverlight plugin in the Internet Plug-Ins folder.
    Might be help for error 1001 >  http://www.google.com/search?q=netflix+error+1001&hl=en&biw=999&bih=767&source=l nms&ei=f1d0TsTwE-nWiAK5sMjTAw&sa=X&oi=mode_link&ct=mode&cd=1&ved=0CC4Q_AUoAA

  • Security Permissions for simple file transfer

    Hey All
    I'm transferring a file using RMI as part of an enhancement. I want to restrict where the file can be transferred to and thus will use a security manager (On the destination object). However the object its being transferred to shares the same JVM with another quite complex application that currently doesn't need a security manager.
    Will I need to set a whole host of permissions for this application even though I only want to restrict file writing?
    I suspect this is the case just want confirmation.

    Hi,
    In the code which receives the file being transferred, you might try calling System.setSecurityManager(new SecurityManager()). Use the configured Java policy to limit where the file can be written. After calling setSecurityManager(), save the file. Before returning to the rest of the application, call System.setSecurityManager(null). Ensure that your code has setSecurityManager permission or this call will fail. If this idea doesn't work, you could simply use a security manager for the whole application, and just grant AllPermission to everything except the file receiving code. Everyone says AllPermission is dangerous, but it's no more dangerous than running with no security manager at all :)

  • Access permissions for eps file on Mac

    I am asking this question on behalf of a friend...
    "When I create an  eps file on a mac, it only gives access to the person who created it and  it gives the everyone group no access. Is there a way to default this  so that everyone has read rights to it?
    I have other machines that do  not have to change the rights and automatically give read rights to the  everyone group by default but I am unsure where or what to change to  make this happen for this one user."

    Are you logging into a user with Administrative Privileges?
    If it is a user account that does not have adminstrative or standard privileges then this might be a problem.
    For instance a guest with sharing only.
    You set the privileges in the new accounts
    You may also have to repair the permissions using the disk utility app in the Applications>Utilities
    Or you might have to manually set the sharing to read write for a particular directory which is done with the Get Info dialog.

  • I only create Read Only folders can't set permissions for any file but mine

    My issue is I have 25 users and an X-Serve and it seems like all the users
    do not have the same permissions. More specifically if a user creates a
    folder on the server only that user can access it. This is the same if the
    user creates the folder on there desktop and then copies the files to the
    server. But if they copy a "read only" folder or file (this happens more
    with files) to there desktop and then they open the file save it and place
    it back on the server there is no problem.
    I also, have a user that whenever she creates a folder it automatically
    set's itself to read only. No matter whether she copies from her desktop to
    the server or visa versa. Every folder she creates is protected this way
    here settings are all the same as everyone else. So I'm not sure if she is
    unique or if the settings for my users are incorrect.
    I did not set up the server or the user's so I'm really trying to catch up
    quick. We are really suffering in that it totally slow's things down almost
    to a crawl in some cases. I really hope you can help me out with this I've
    attached some screen shot's and the X-Serve system profiler for background.
    --

    I suggest posting to the Xerve forum http://discussions.apple.com/forum.jspa?forumID=854

Maybe you are looking for