Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I can retrieve the logged in user name using NSUserName(), but how do I get the Open Directory "directory domain name" or other domain he is a member of? i.e. similar to the notion in Windows where a logged-in user is DOMAIN\USERNAME, where DOMAIN is his local machine, workgroup or Active Directory domain.
You may be able to do this with Directory Services. Alternatively, check out the new Open Directory APIs introduced in 10.6; you have a choice between a Core-Foundation-based API and a Cocoa-based API.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
This is how I am changing the directory path to the download folder.
Dir.chdir("C:/Users/abcd/Downloads/")
But this specific to a user. Is there is any way to make it more general?
Use home method for Dir
Dir.chdir(Dir.home + '/Downloads')
The "C:/Users/abcd/Downloads/" looks like the user directory for user abcd on windows. So I think this is a windows related question.
The Dir.home on my Windows-PC is U:/, not the user-directory.
But you can make use of ENV:
Dir.chdir(File.join(ENV['USERPROFILE'], 'Downloads'))
Just to be aware of: This changes the directory for the rest of your script. There is also a block-version of Dir.chdir.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm considering moving some company data from our on-premise file shares to dropbox/box/google drive storage services, the only consideration now is security. Is it possible to give our employees the ability to always see that data exists on the service but block access to it if is done after work hours?
To be more specific, assuming I have file "x.png" in my company's shared Dropbox folder, I want users to always be able to see that "x.png" exists but if the attempted access is after work hours I want to give the user some kind of notification "File is not accessible" and maybe also log the attempt.
Thanks
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 9 years ago.
Improve this question
I had an account name bally and had to create a new account called jbally because there was something wrong with bally.
This fixed the original issue which is not important but now when I go to save a vim file is says that it's not writable even though the the permissions show -rw----- which match another computer's permissions where vim works on.
any tips?
Thanks,
Max
image one
image two
image three
Since you probably didn't change the owner of any of the files when you created the new account. You just need to change the owner.
To do this use chown to change the owner to jbally.
sudo chown -R jbally /User/bally
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
How do I change folder permissions recursively in Windows 7? Specifically, for my WAMP server, I want to change the permissions of my "www" folder so that its contents can be viewed over the Internet, and I want all of its subfolders to have the same permissions. Currently, for each folder, I'm getting the following message in my browser: "You don't have permission to access / on this server." I believe there's a simple command I could enter in a terminal for recursively changing folder permissions for global access; I just don't know what it is.
Replace all child object permissions with inheritable permissions from this object checkbox must be checked when changing permissions under Properties > Security tab > Advanced > Change Permission
Do this in the GUI to the parent folder.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to create an app which sends some data on boot to a server. Should I write a service or wait till that user logs in, creating a registry key at Run. I think that windows connects to the internet after log in, but I am not sure.
Network Awareness in Windows XP
Network Awareness in Windows Vista and Windows 7
I believe the Vista/7 implementation is just using a request to a web site setup by Microsoft to determine if the web site is reachable.