Shared folder on Mac [closed] - macos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
The default Shared folder in MacOSX does not seem to live up to its name. Sure, all users on the local Mac can create folders and add files to the Shared folder, however other users cannot open the files or make any changes, unless it is files & folders they created/added.
Using the permissions GUI (ACLs and POSIX), I failed to find a solution to my needs which are essentially to make the Shared folder a place where all local Mac users (or a subset of users) have full permissions.
I am hoping that someone would have a suggestion.
Cheers

You can't do this with the GUI; it doesn't allow you to control (or even see) some of the necessary settings. So you need to use the Terminal, and run some chmod (change "mode", i.e. change permissions), and you need to use sudo to run them with root permissions (note that sudo will prompt for your admin password to allow this, but the password won't echo as you type). Also, be careful with these commands (or anything else involving sudo) -- the specific commands I'll give you should be safe, but if you change the wrong permission on the wrong file, you can completely break the OS.
You need to do two things: remove the "sticky" bit (which prevents users from deleting/moving/renaming other users' files):
sudo chmod -t /Users/Shared
Then add an inheritable ACL granting everyone full read+write access. The Finder's Get Info window will let you add ACLs, but not control inheritance, so again you use sudo chmod ... and include a long list of exactly what types of file access need to be allowed:
sudo chmod +a "group:everyone list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" /Users/Shared

Related

System cannot find the directory of current running process in “C:\Windows\Fonts” folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have a file running from this directory:
C:\Windows\Fonts\com4.{208d2c60-3aea-1069-a2d7-08002b30309d}, When I want to open that directory it says System cannot find the specified path and when I want to delete the file inside that folder with PowerShell, it says Access Denied!
How can I delete the file and folder?
COM4 is a special reserved 'DOS Device' name. Files or Folders with these types of names can not be created or accessed by normal means. Also the appended string .{208d2c60-3aea-1069-a2d7-08002b30309d} is the Shell CLSID for My Network Places, It will cause the folder with this appended sting to appear as such in Windows Explorer to hide the contents.
It can be renamed to a normal name so it can be be accessed afterwards. But since it is located in the system folder C:\Windows\Fonts, Administrative rights are needed for doing so.
In an elevated Command Prompt (CMD.EXE) this command can be used to rename the folder
ren "\\.\C:\Windows\Fonts\com4.{208d2c60-3aea-1069-a2d7-08002b30309d}" "NewName"
But for the rename to be successful, any program(Most probably a malware as you mentioned) that is running from this folder must be terminated beforehand.
A malware can have other protections mechanisms to prevent you from doing any of the above actions or easily undo what you have done, So you should protect your system with an updated Antivirus product and keep it updated until it is detected and removed completely.

sudo mkdir ask for password? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
OK i googled a lot but something just doesn't add-up:
in terminal i use this code: sudo mkdir /Volumes/aNewFolder
but then the terminal asks me for my user password. why? and also - how can i pass the password so terminal wont stop and wait for user's input?
this is silly but i cant seem to fix it or to find it on the web; all i want is to mkdir without having to input my password directly...
i didnt really tried anything cause i cant seem to find any info about it.
im pretty sure that the solution is easy and im missing something. im new to unix and bash but mkdiris a very basic thing, right?
help, please?
edit: forgot to say that i thought expect could help but all i see is how to use it with ssh...
mac user
sudo = super user do.. You need to give your terminal session the password for the super user, to have "administrative" access.
Depending where you're trying to make a new directory, you don't always need to add "sudo" to your command.
If say you were trying to make a new directory in your home folder.. i.e.: mkdir ~/myNewDir
you won't need to add a sudo to it, because your home folder is owned by your user.
But let's say you were trying to make a new folder in /etc/ssh/, an area where your user does not have read/write access to, you would need to append the command with sudo, to inform the CLI that a or the, super user is going to perform the task.
Hope it helps.
If you really want to skip the password authentication every time, you could type:
sudo -su root give it root users password, and from that point on forward (and only for that terminal session) will the user root be used (see it as super user), and your commands will run without any authentication (Since root user has read/write access across the system). I wouldn't recommend doing this, if you're not sure about what you're doing.

Automount samba folder on Mac [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I trying to make mount smb folder on startup.
I do like here - http://aj.tarachanowicz.com/?p=158
But I have error constantly - "Too many user".
May be somebody meet this error?
Thank you.
My answer is an adaptation of the answer in https://discussions.apple.com/thread/3221944?start=15&tstart=0
The variation is, I moved the mount point from your home directory to a system area (e.g. /smb) and ensuring that the user can create that mount point, i.e. 4755 permissions.
Add this line to the end of /etc/auto_master:
/- auto_smb
Create parent folder:
sudo mkdir /smb
sudo chmod 4755 /smb
Create /etc/auto_smb with:
/smb/folder -fstype=smbfs,soft ://domain;user:password#server/folder
Run automount:
automount -vc
The troubleshooting points are:
If you encounter "Too many users" you need to review your SMB path for typos and syntax errors.
Also be careful of incorrect username / passwords, or passwords with special symbols. e.g. # would need to be replaced with %40.

Permission changes when copying bundle in OSX [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I have an bundle directory with full permissions (777) (includeing subdirectories)
whenever I copy it to another directory using cp -r I see that it loses some of its permissions.
What is the cause of that and how can I move this bundle while keeping its permissions intact?
I have a Lion version.
Thank You
Use the -p flag:
cp -Rp whatever whereever
From the cp manpage:
Cause cp to preserve the following attributes of each source file
in the copy: modification time, access time, file flags, file mode,
user ID, and group ID, as allowed by permissions. Access Control
Lists (ACLs) and Extended Attributes (EAs), including resource
forks, will also be preserved.
If the user ID and group ID cannot be preserved, no error message
is displayed and the exit value is not altered.
If the source file has its set-user-ID bit on and the user ID can-
not be preserved, the set-user-ID bit is not preserved in the
copy's permissions. If the source file has its set-group-ID bit on
and the group ID cannot be preserved, the set-group-ID bit is not
preserved in the copy's permissions. If the source file has both
its set-user-ID and set-group-ID bits on, and either the user ID or
group ID cannot be preserved, neither the set-user-ID nor set-
group-ID bits are preserved in the copy's permissions.

Block access to folder or file in Mac OS X [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there any way to block access to some particular file or folder in MacOS X, so that it can be protected by password, system-wide?
I want to use it in Cocoa based program, but before that I just want to know at least general possible methods of accomplishing it.
As far as I know POSIX file access system doesn't allow to protect something with password.
I was thinking about creating additional user account with dedicated password and then setting this user as an owner of a file with chmod. In terminal it seemed to work, but that is quite bad way, I think, since that is a sort of permission problem. And you need to change user in terminal for that. I don't think that can be done if one wants to access it through regular application like Finder.
So does anybody know better ways?
To create a password protected "folder" you can use an encrypted disk image and mount it at the location you require the folder. The command hdiutil can be used to create, mount, unmount etc. such disk images. Use the the -plist option to easily drive the hdiutil command from Objective-C.

Resources