I have a remote drive (on an SBS 2011 server) mounted on my iMac BUT each time I reboot the iMac I have to relogin into the remote drive. How can I make this automatic?
I have come across some AppleScript approaches but none of them seem to work. E.g.
do shell script "mount_afp afp://username:password#192.168.100.2/Backups123 /Backups456"
Where username/password are valid for the remote server/folders, 192.168.100.2 is the IP of the Server and /Backups456 is the name of the mounted volume on the iMac.
Any ideas?
Related
i'm trying to understand what i don't know, why MAMP cannot work on port 80 when documents dir is on removable hdd.
I'll try to explain the behavior.
I have installed MAMP on mac os 12.5.1, set apache port on 80 and apache documents folder in an external drive.
When i try to access to localhost i receive 403 status.
Apache log said:
1)Operation not permitted: [client 127.0.0.1:49708] AH00132: file permissions deny server access:
Then i started to try to get MAMP work on port 80 when the documents dir is in an external drive, because it work correctly if the documents folder is the default MAMP dir ( /Applications/MAMP/htdocs )
I tried to grant full disk access, nothing change, tried to set dir group in external and removable drive to _www, same above, nothing change, changed file permission, etc.
I figured out i can solve my problem only executing apache from terminal with super user privileges
sudo /Applications/MAMP/bin/startApache.sh
If some httpd process already started, simply i kill it and then execute startApache.sh.
To get MAMP working using documents dir on external removable drive i execute first
sudo killall httpd
and
sudo /Applications/MAMP/bin/startApache.sh
.
I thinks is a problem related to Mac SIP.
My question is: there is a way to grant permission to MAMP on removable device ?
I tried also to write a really simply applescript that do above shell script with sudo but not working, apache start but doesn't working, same 403 status using port 80. Meanwhile it's work on port 8888.
This is the very simply applescript i wrote to do the same i do from terminal:
set complete_start to false as boolean
try
do shell script "sudo /Applications/MAMP/bin/startApache.sh" with administrator privileges
set complete_start to true as boolean
end try
if complete_start then
display dialog "Apache start"
else
display dialog "Something wrong"
end if
return
I'm getting crazy figuring out this situation, i think it's only a sip related question, and i cannot understand how i can grant access to removable device with right permission to use mamp with a documents dir on an external drive.
Hoping someone have patience to drive me in the right way.
Thank in advance.
I currently purchased Synology's ds220+ model and am using it as a NAS Server.
The line is connected to the LAN port of the router to which the WAN line is plugged, and the end is connected to the NAS.
In this situation, I wanted to set up a NAS server to be used externally, not on a local network.
So I even set up WebDAV Server, DDNS, and port forwarding on the router.
To test this, I created a NAS server directory through RaiDrive in a Windows environment.
From the created directory, I tried to upload files to a folder with read/write permission and confirmed that it was working normally.
However, the problem occurred in MacOS.
In Finder, a server folder was created through the "Connect to Server" option, and a file upload was attempted, but an error such as the attached picture occurred in all types of files.
Could you tell me if there is a problem with the way MAC creates the server folder?
Idea: Your OS doesn't support SMB:
Download an FTP or SMB client. (FTP: E.g.: Filezilla)
Idea: A friewall is blocking it:
Check your anti-virus-program
Other Problem:
Use an USB Stick & NAS USB Copy
or upload it via DSM File Manager
Open NAS IP-adress via Safari/Firefox/Chrome
Log In
Open File Station / File Manager
Search folder
Click [Upload]
Choose the file from your PC
Finised
I have a VPN restricted share network on a server (Win 10), and after I connect to VPN and try to connect to that shared network on my Ubuntu 20.04 client (Ubuntu Desktop) via GUI. By GUI, I mean specifically applying these steps:
Open "Files" browser.
Select "+ Other Locations" on the left side-bar menu.
Type your server to connect on "Connect to server", mine was something like smb://myServer/shared/ and click "Connect".
When a login prompt appears, write down your credentials (or login anonymously).
You should have access to that shared network now.
When I did those steps above before upgrading to Ubuntu 20.04, when I was using Ubuntu 18.04, I was able to successfully access to the shared network.
After upgrading to Ubuntu 20.04, however, on the step 4 (after I enter my credentials and try to connect) the connection just hangs, and the shared network is not mounted.
After researching the problem a bit, the potential solutions I found did not work, most of which
suggests to add the following to smb.conf to be able to access to SMB1 type of network.
client min protocol = NT1
server min protocol = NT1
Reference
Can't acces NAS anymore after upgrading to 20.04.
Currently, what I tried aside is to mount the shared folder manually with the following command
sudo mkdir /mnt/my_share
sudo mount -t cifs -o username=name,password=pw //server/shared /mnt/my_share/
which strangely worked.
I do not have a clue why "Files" did not work and manually doing it worked. I cannot say the former failed completely because after entering credentials on login prompt there was no error, but just hangs.
I am mounting a drive on mac os using applescript.
tell application "Finder"
try
mount volume "http://user:pwd#196.145.75.18/mydrive/page.apsx/webdav"
end try
end tell
I am getting drive name as 'webdav' and on the sidebar in shared section I am getting the server address(196.145.75.18) as drive name.
I want to change both of them as 'mydrive'.
Does anyone know how it can be done using applescript? if can not be done using applescript then is there any other way to do this?
What you're doing is the equivalent of using the Finder's "Connect To Server..." command in the Go menu. If you use an IP address there, you're also going to see an IP address in the sidebar. There's no way to change that.
If your target server is on your LAN and has Bonjour/mdns (e.g. OS X, Windows with Bonjour Print Services or iTunes installed, or Linux with avahi-daemon installed), you can instead use "myserver.local" for an address. You can also put "local" as a search domain in your DHCP server (usually your router, but could be OS X Server for example), or manually into your network settings on your client machine(s), to just use "myserver" without ".local".
Or, if your target server is on the WAN, and you have a DNS server for mydomain.com (usually your registrar provides one, or you can host your own with, for example, OS X Server or a router firmware like DD-WRT), you can create a machine (A) record for "myserver.mydomain.com" for that IP address. In your DHCP server (typically your router, but it could be OS X Server), put "mydomain.com" in the DNS search domains; or, if it's a laptop that needs to work in multiple places, put it in manually into the network settings on your client machine(s). Then you don't have to enter the FQDN for an address when you connect, just "myserver".
bash:
mkdir /Volumes/webdav
mount_afp http://user:pwd#196.145.75.18/mydrive/page.apsx/webdav /Volumes/webdav
or more likely:
sudo mkdir /Volumes/webdav
sudo mount_afp http://user:pwd#196.145.75.18/mydrive/page.apsx/webdav /Volumes/webdav
Case 1 in applescript:
do shell script "mkdir /Volumes/webdav"
do shell script "mount_afp http://user:pwd#196.145.75.18/mydrive/page.apsx/webdav /Volumes/webdav"
To use sudo in applescript, you need to create dialog box to type in password etc.
I have a Perl script which maps two drives, and then proceeds to copy files one of the drives to the other. The Perl script is located on a Windows box, but we are SSHing from a Linux box into the Windows box to execute the script. When I run the script directly from the Windows box, everything works without issue, the drives are mapped and the files are copied over successfully. When I attempt to execute the script from my Linux box via SSH, the script fails and I get the following output:
The local device name is already in use.
Error mapping source \\xxx.xxx.net\localdirectory
This error occurs when attempting to map the first drive, I don't know if it would fail on the second drive as well since it has not made it that far.
I have several other Perl scripts that are executed this same way (via ssh from Linux to Windows box) and they execute without issue, this is the only one that maps a drive though. This is the code I am using to execute the script:
#!/bin/sh
ssh -t -t user#server "cd /Path/to/Perl/Script; /cygdrive/C/Perl/bin/perl.exe Script.pl"
What user is your ssh daemon running as? Presumably System. That user doesn't have authority to map network drives, as far as I recall. Can you not just do this on the Linux box directly using samba?
In case anyone needs this in the future, we we're able to get it working. The issue was due to the SVCCopSSH being used for the CopSSH service on our Windows machine. We had to disable the CopSSH service, set the Log On as the network account we were using to SSH from Linux to Windows, and restart the service. This fixed all issues we were having.