Sudo chmod

Despite having admin rights, I can't execute a file that I need to (it's a Kyocera Permission fix for Kyocera printers running under 10/.6). I read that I can get Read/Write AND Execute rights to a file using the sudo command in the form sudo chmod 755 /path/to/command, run from terminal.
Perhaps the reason I can't execute this file is because I have Read and Write but not Execute rights - trouble is I can't find anywhere 'normal' to assign the Execute rights.
Any experience with the sudo command? The file is on my desktop so I have tried sudo chmod 755 /Users/coz/Desktop/OSX10.6 permissionfix/kyocera OS X 10.6 solution.command
but I get:
chmod: /Users/coz/Desktop/OSX10.6: No such file or directory
chmod: permissionfix/kyocera: No such file or directory
chmod: OS: No such file or directory
chmod: X: No such file or directory
chmod: 10.6: No such file or directory
chmod: solution.command: No such file or directory
Any thoughts on how I might word this sudo command to get the Execute rights?

sudo chmod 755 /Users/coz/Desktop/OSX10.6 permissionfix/kyocera OS X 10.6 solution.command
The problem with what you have typed is that it includes spaces, and spaces are the delimiters between parameters in a Unix command. It's reading what you wrote as a series of 6 files you're asking it to change. You can put a backslash ('\') before each space, include quotes around any filename that contains spaces, or best of all, just type the "sudo chmod 755 " part (noting the presence of a space at the end) and then drag the file onto the Terminal window to insert an appropriately-formatted path to it.
All that said, I don't know that I'd recommend monkeying with permissions on that item... I'd recommend contacting Kyocera support and asking them about the problem. They may come back and say to do exactly what you're trying to do, but they may also say something like that you shouldn't use that item and that there's a newer version.

Similar Messages

  • Sudo chmod -R 770 ~

    When using either sudo chmod -R 770 ~ or sudo chmod -R ug+rwX /Users/User, the permissions on my home folder change to include wheel read/write permissions. How and why is wheel showing up?

    xnav wrote:
    If you are doing this on the home folder why would you need 'sudo'?
    That has nothing to do with my question. (?)
    During the process of trying to import and get some old SSH keys working correctly I accidently changed the permissions on my home directory. There are several symptoms you'll see if the permissions are wrong in your user folder such as:
    If you're browsing to your home folder using Finder and get a message like 'The folder "username" could not be opened because you do not have sufficent access privileges'
    When trying to access your home folder in a terminal, you keep getting redirected back to /
    If you can't access your home directory in Mac OS it makes sense to do it the way I have.
    Now that we have that out of the way - why is wheel present?
    Thanks.

  • How to run "sudo chmod" Folder Action?

    My MacPro has a dedicated drive for photos taken by myself and my wife on our respective iPhones. However when I download photos from my iPhone then my wife cannot access them due to limited privileges. The solution is to chmod the files to 755. So I made a Folder Action with the following Run Shell Script
    chmod -R 755 /Volumes/DATA/Camera\ Pictures
    It works on my photos however it does not work on the photos that my wife uploads to the shared drive since I am not the owner of her iPhone photos. So I need to run the sudo command however I am unable to code an Automator Folder Action to accomplish this because it results in error with or without the sudo command in front of the chmod command. Could somebody assist?

    I appreciate your assistance Niel. Here is my Run Applescript text:
    on run {input, parameters}
      do shell script "chmod -R 755 '/Volumes/DATA/Camera\ Pictures/PHOTO\ VAULT/Photos\ per\ annum '" with administrator privileges
      return input
    end run
    I included the full path this time. I receive Syntax Error [Expected """ but found unknown token].

  • [SOLVED] I made sudo chmod -R ~/ by mystake

    I cannot enter my system anymore. I confused the root directory with home.
    Now when I try to enter into my system it complains. The KDE desktop doesn't fully load.
    It creates a window where it says: Call to lnusertemp failed (temporary directory full?) Check your installation.
    Is there anyway to fix it?
    Last edited by doblerone (2014-03-18 08:52:49)

    I try to fix it by making:
    sudo chown david:users /home/david
    I rebooted and at least the desktop loads with some problems still. It says in a lot of windows that it can't write into the configuration file : /home/david/.kde4........ Contact with your admin

  • Sudo chown + chmod on system drive?

    Hello,
    Before I mess my system drive up I wanted to check if this is ok.
    For various reasons I have created a new Account that I wish to migrate to. I log in ok and can change permissions but there seem to be files on various places that I keep having to set permissions for and wish to resolve this for the whole drive.
    What I want is a way to set permissions on all non system files to add admin access as it appears it is not there for certain files
    I found the below commands which worked on my media drive but am reluctant to run it on the system drive:
    sudo chflags 0 /Volumes/System
    sudo chown 0:80 /Volumes/System
    sudo chmod 775 /Volumes/System
    sudo chmod -N /Volumes/System
    I think the one above should have the "R" in as below to do this recursivly ?
    sudo chmod -RN /Volumes/System
    I don't want to mess up the system drive so I thought I should check if this is ok or not. I think some system files need to be read only so I need to know if this will render the drive useless(I do have a full backup).
    I also see people recomend Batchmod but am again unsure if this will work or what settings to use?

    Thanks Niel,
    I have read numorous posts from yourself and V.K. relating to locked secondary drives but nothing relating to system drives and fully expected that answer. can I bother you a bit more please?
    Can I safly run those commands on some of these folders?
    system\users\olduseraccount
    System\library\application support
    System\library\audio
    I think that would solve most issues there are hundreds of folders with presets from plugins that have installed with only my old account as read write not admins?
    Thanks again Niel
    Ross

  • Problem with sudo - sudoers is mode 0604, should be 0440

    ryans-imac-2:~ Ryan$ sudo chmod -RN /.vol
    sudo: /private/etc/sudoers is mode 0604, should be 0440
    ryans-imac-2:~ Ryan$ postdrop: warning: unable to look up public/pickup: No such file or directory
    Please advise.

    There is a '-N' option for chmod -- it's for removing ACL's.
    The best way to learn is not to make random changes that you don't understand, and then ask for help in public forums when something goes wrong. Set yourself a constructive problem to solve; for instance, by writing a shell script. Read man pages. Read UNIX books.
    You say you want to grant permissions to the current user. Which permissions -- read, write, execute, all? Do you mean ownership? ACL's? Recursive? Sticky or SUID bits? What permissions should other users have? First learn how to ask the right question, then you'll most likely be able to answer it yourself. Start with the chmod(1) man page. When you understand everything on that page, you'll know quite a lot.
    Meanwhile you might be able to repair the damage you'be already done by running the "Repair permissions" routine from Disk Utility. This would be one of the few situations where it's actually useful.

  • [SOLVED] I did a dumb thing... (chmod/chown)

    Hi all, hope this is the right section,
    So I decided that I was tired of authenticating when I wanted to change some files for my SLiM theme, and decided to add permissions to my user.. on the entire share folder. Well, here's what I ran:
    [naut@arch /usr]$ sudo chown -Rv root:naut share/ && sudo chmod -Rv 664 share/
    Yep. So after I did that I noticed that xfce stopped working properly; all of my icons, panels, etc, were showing as follows: ▖▖▖▖▖▖▖▖▖▖
    I immediately tried to revert the change my chowning back to root:root, and setting most files back to 644, but it had no effect. I logged out and logged back in to see if it was a temporary thing, but when I logged back in, even more items were showing ▖▖▖▖▖▖▖▖▖▖. I switched to another tty and chmoded all of /usr/share to 777... now I know that's generally a bad idea but when I logged back in, I did see that it at least went back to normal functionality.
    So my question becomes, how can I know what dirs/files need what permissions? I'd like to get it back to where I have the least permission required for everything to work properly.
    Last edited by naut (2014-05-09 14:56:16)

    644 broke things because directories need execute permissions to be traversable.
    Unfortunately, /usr/share is a grab-bag of permissions:
    # find /usr/share -type f -exec ls -l {} + | cut -d ' ' -f 1 | sort | uniq -c
    2879 -r--r--r--
    4 -r-xr-xr-x
    49229 -rw-r--r--
    12 -rw-r-xr--
    143 -rw-rw-r--
    277 -rwxr-xr-x
    3 -rwxrwxr-x
    You'd probably be safe enough to set all files to 644 and all directories to 755, but you might want to check with pacman -Qkk and reinstall any packages that complain about permissions mismatches. This won't fix everything though, as some packages still pre-date MTREE files.

  • Chmod operation not permitted

    I tried to burn a data DVD, got Error code 0x80020000, and the Finder created a burn folder (although I NEVER set my preferences for this and hate it) that is locked and the √ for Locked is greyed. I want to ditch the burn folder because I always like to name the DVD and the burn folder acquired the name I want to use for the DVD (can't have two disks same name locally, right?). No matter either way about naming, I still want to unlock and trash this burn folder. It has permissions: owner = (Me) Read & Write, Group = staff Read only, everyone Read only. Using Terminal, I tried "sudo chmod a+w foldername.fpbf", but the result was "Operation not permitted". Is the all (a) parameter wrong? Is the parameter wrong? Is it because w permission is already applied to the owner? I thought that doesn't matter.

    Moof666 wrote:
    (can't have two disks same name locally, right?)
    Sure you can. Don't knock it 'till you've tried it.
    Using Terminal, I tried "sudo chmod a+w foldername.fpbf", but the result was "Operation not permitted". Is the all (a) parameter wrong? Is the parameter wrong? Is it because w permission is already applied to the owner? I thought that doesn't matter.
    That folder probably has extended attributed. Try unlocking it via the Finder. You may have to toggle it on and then off, maybe a couple of times.

  • Sudo Command Problems

    I tried to use the sudo command in my terminal. The first time i entered the command " sudo chmod a+x install-mac-linux.sh " ,it said the warning and then asked for a password. I tried to type in my password, but nothing would show up on the terminal, like my keyboard was out of batteries. I pressed enter and it asked for the password again and still nothing would show up.I repeated this like 10 times and now is says "chmod: install-mac-linux.sh: No such file or directory " So now I'm lost and would really appreciate some help
    This is what it last said
    Last login: Fri Jun 17 20:19:49 on console
    Clay-Callans-iMac:~ Clay$ sudo chmod a+x install-mac-linux.sh
    Password:
    Sorry, try again.
    Password:
    chmod: install-mac-linux.sh: No such file or directory
    Clay-Callans-iMac:~ Clay$ sudo chmod a+x install-mac-linux.sh
    chmod: install-mac-linux.sh: No such file or directory
    Clay-Callans-iMac:~ Clay$

    Instead of typing the file's name, drag it from the Finder into the open Terminal window.
    (58847)

  • Can't get rid of files with sudo rm: Operation not permitted?!?

    I just noticed that I have a few directories in my files that have a username of "unknown" from GetInfo (username of 314112960 from ls -l) and can't be touched by me. I opened Terminal, and tried to "sudo chown" and "sudo chmod" them; both came back with "Operation not permitted". Can someone tell me how it's possible that su is not allowed to touch them, and more importantly, how I go about civilizing them so that I can see what's there and get rid of it? Thanks,
    Mike

    ls -lod yourfile
    If it says schg, then you have to reboot into single
    user's mode (hold down command-s while the machine
    reboots), then run fsck (the prompts will suggest
    what to type, so you don't have to memorize it here),
    then mount the file system, run fsck again if there
    was a problem reported the first time, and when you
    get the all clear, then navigate to where the file
    is, issue the command
    chflags noschg yourfile
    rm -R yourfile
    and then run fsck one more time (it helps to be
    paranoid) and then reboot.
    Thanks for the specific instructions! I did that and here's what happened.
    The first fsck said everything was fine. The chflags was ok as well. I tried to chown both directories then, to see what was there, and the first time it failed with a "operation not allowed" error. I then did rm -R on one of the directories, and it disappeared. I then tried the chown again on the other one, and it worked! Weird. Maybe there's some latency here somehow. Anyway, I decided I wanted the whole thing gone and I did an rm -Rf on it, and it deleted almost everything, except for one file, which was a link to a nonexistent file (it had an ls -l of "lrwxrwxrwx" (is that a hard link?). When I try to delete that one, it says "no such file or directory". I thought rm was supposed to delete the link, not the file the link is pointing to! Anyway, I couldn't think of any way to get rid of it - it just won't let me do it. Anyone have any ideas how to get rid of this link? It's sitting at the bottom of a long tree of directories and I'd now like the whole thing gone... Oh and then I fsck'd again, which said no error, and I rebooted. Finder won't let me delete it either (error 43, file cannot be found). What do you think?
    Thanks,
    Mike

  • Sudo command broken! (UNIX people-- please help a stupid newb :(  )

    To talk to unix people, go here:
    http://discussions.apple.com/forum.jspa?forumID=735

    to fix an that app's perms usually this works:
    sudo chmod -R =rw,+X /Applications/VirtueDesktops.app
    or
    sudo chmod -R =rw,+X,g=u /Applications/VirtueDesktops.app
    a. This returns all files in the app to their usual UNIX defaults.
    b. Some apps will require r/w permissions on the group to function.
    c. All OS X apps should bear admin (80) as the group ID
    d. Some apps require owner be set same as user, most like owner set as root.
    Snow Leopard's Sudo visiblepw flag is no longer set as it was in 10.5.x
    The "visiblepw" option must be entered into the Defaults
    section of the /private/etc/sudoers file in order to allow
    sudo to run in 10.6 when a tty is not allocated. From the
    sudoers manual:
    "visiblepw
    By default, sudo will refuse to run if the user must enter a password but it is not possible to disable echo on the terminal. If the visiblepw flag is set, sudo will prompt for a password even when it would be visible on the screen. This makes it possible to run things like "rsh somehost sudo ls" since rsh(1) does not allocate a tty. This flag is off by default."
    Using visudo, Add the line "Defaults visiblepw" to the Defaults section of the /private/etc/sudoers file and the following error message will no
    longer appear:
    sudo: no tty present and no askpass program specified
    A valid workaround is to use the
    "-S" (capital S) option with sudo.
    I noticed you used su with sudo, that is not cool.
    Kj ♘

  • [SOLVED] Sudo and seteuid issues

    A couple of days ago, something strange happened to my user account.  I  couldnt log into my window manager (enlightenment) as a non-root user.  Also, each time I would try to issue a command using sudo, it would return some error about seteuid (I can't rememer exactly what it said).  So I fiddled around with the sudoers file to make sure I had sudo access (which I now do), but I still can't issue the startx command as a non-root user or without sudo.  I suspect it has something to do with the seteuid error, but I don't know what to do about it.  If I run startx, it returns:
       Fatal server error: Cannot move old log file "/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"
       xinit: givingup
       xinit: unable to connect to X server: Address family not supported by protocol
       xinit: server error
    I tried changing the permissions on these files, which didn't work.  Hours of google searching hasn't helped much, but here is a link to a page that describes a problem as similar to mine as I could find:  http://forum.tinycorelinux.net/index.php?topic=195.0
    It mentions this:
       BTW, the "Can't open /var/log/Xorg.o.log" is possibly because "set uid" became unset in the tcz conversion - does "ls -l /usr/local/bin/Xorg" show an "s" in there somewhere?"
    but I don't even have that file to try to use their solution.
    /home/user/.xinitrc contains only 1 line:  exec enlightenment_start
    Please help me figure what to do about the seteuid or setuid, so I can run startx as a non-root user, again.  Thanks!
    Last edited by cubisttriangle (2012-01-22 22:45:03)

    Awesome! Thank you, smudge! To fix:
    $ whereis Xorg
    Xorg: /usr/bin/Xorg /usr/share/man/man1/Xorg.1.gz
    $ ls -la /usr/bin/Xorg
    -rwxr-xr-x 1 root root 1.9M Dec 17 01:18 /usr/bin/Xorg
    $ sudo chmod +s usr/bin/Xorg
    -rwsr-sr-x 1 root root 1.9M Dec 17 01:18 /usr/bin/Xorg
    After these commands, I could get into my window manager again without root privileges.

  • Must run /usr/local/... apps as sudo?

    Has something deep in the esoteric bowels of OS X changed in Snow Leopard that now requires me to "sudo" any application I might otherwise run from /usr/local? Examples: mysql and git are installed to /usr/local/mysql-5.0.67 and /usr/local/git (respectively) — both of which were installed on this MacBook Pro while running 10.5, both of which ran just fine (as my normal user) for months, and now both... there but won't run unless I sudo...
    Example!
    [20:16:51 ~]
    rob@Connemara $ git --version
    -bash: git: command not found
    [20:17:04 ~]
    rob@Connemara $ /usr/local/git/bin/git --version
    -bash: /usr/local/git/bin/git: Permission denied
    [20:17:18 ~]
    rob@Connemara $ sudo git --version
    git version 1.6.4.2
    (1) Yes, /usr/local is in my $PATH.
    (2) Yes, /usr/local/git/bin is in my $PATH.
    (3) Ditto /usr/local/mysql (symlinked...)
    ...anyone?

    Solved here: http://discussions.apple.com/thread.jspa?messageID=10139530
    sudo chmod 755 /usr/local

  • Gain Permissions when the sudo cmd doesn't work

    This is what the permission says:
    " d-wx-wx--- 3 Spitfir3x admin 102 15 Feb 16:13 /Library/Folder"
    This is what happens when I use the sudo command in terminal:
    "unknown-00-23-12-27-ef-32:~ Spitfir3x$ sudo chmod 775 /Library/Folder
    Password:
    chmod: Unable to change file mode on /Library/Folder: Operation not permitted"
    I tried it the regular way to, and used disk utility to try to fix permissions, but nothing worked and I can't gain access to the file.
    Help

    Spitfir3x wrote:
    BobHarris wrote:
    try
    ls -lde@ /path/to/directory
    Maybe there is an ACL on the directory.
    so nothing came up when i typed that in. am i supposed to change one of those to the folder name? Or add something else?
    Ok so i'm dumb and figured it out. This is what it shot back at me
    d-wx-wx--- 3 Spitfir3x admin 102 15 Feb 16:13 /Library/Folder

  • Changing Permission when sudo cmd doesnt work

    This is what the permission says:
    " d-wx-wx--- 3 Spitfir3x admin 102 15 Feb 16:13 /Library/Folder"
    This is what happens when I use the sudo command in terminal:
    "unknown-00-23-12-27-ef-32:~ Spitfir3x$ sudo chmod 775 /Library/Folder
    Password:
    chmod: Unable to change file mode on /Library/Folder: Operation not permitted"
    I tried it the regular way to, and used disk utility to try to fix permissions, but nothing worked and I can't gain access to the file.
    Help

    Post to the Unix forum under OS X Technologies.

Maybe you are looking for