Skip to main content
No Need to repeat the question
Source Link
nohillside
  • 104.5k
  • 42
  • 222
  • 275

Is there any way i can provide sudo access only a particular folder?

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod -R 755 /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.

Is there any way i can provide sudo access only a particular folder?

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod -R 755 /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod -R 755 /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.

error in syntax
Source Link
njboot
  • 8.6k
  • 5
  • 32
  • 63

Is there any way i can provide sudo access only a particular folder?

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod 755 -R 755 /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.

Is there any way i can provide sudo access only a particular folder?

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod 755 -R /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.

Is there any way i can provide sudo access only a particular folder?

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod -R 755 /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.

Source Link
njboot
  • 8.6k
  • 5
  • 32
  • 63

Is there any way i can provide sudo access only a particular folder?

Don't modify the sudoers file. It isn't necessary. I think what you mean is "is there anyway I can alter ownership and permissions so sudo isn't required?" Yes. You can modify the folder's permissions and ownership settings using Terminal. Note, you will have to use sudo to do so and the command must be run by an administrator.

sudo chown -R $UID:staff /path/to/folder; chmod 755 -R /path/to/folder; exit

Substitute "/path/to/folder" with the proper path. The "chown" command changes ownership of the directory to you (and it's subfolders, using the -R option). The "chmod" command sets the folder's permissions to readable/executable by everyone and writable by the owner (you) only.