Run applescript mounting volume over afp

don't know if it is possible, but is there a way that when my users mount a certain volume i can have an applescript (that is located on the volume or elsewhere) run?

is it posible that your user mount the afp volumes per applescript?

Similar Messages

  • Sharing Volumes over AFP

    I have several Macs. One of which has several firewire drives attached. From other macs on the network, when I browse the Network and authenticate myself I see all of the mounted volumes. So the Mac automatically shares all of its mounted volumes via AFP.
    I recently purchased a firewire CF card reader. And expect that when I insert a card, it gets mounted on the desktop, and is also made available via afp. But that is not the case. For some reason the firewire card is not being shared via AFP. Why is this the case? How can I get it to be exported via AFP like all my other firewire drives?

    Sharepoints will allow you to do it easily...
    http://www.hornware.com/sharepoints/
    Might also be the Get Info>Ignore Ownership checkbox... dunno on that one.

  • Unable to Connect to Mounted Volumes via AFP; Local Network

    Server's name is Boing. If I try: Connect to Server: afp://Boing.local I'm given a list of possible volumes. However, this list only includes my home directory and every user's Public Folder. I am an admin user:
    uid=516(mnewman) gid=516(mnewman) groups=516(mnewman),101(com.apple.sharepoint.group.1),105(com.apple.sharepoint. group.3),103(com.apple.accessscreensharing),98(_lpadmin),102(com.apple.access_ssh),81(_appserveradm),79(appserverusr),80(admin),20(staff),106(com.apple.sharepoint.group.4),104(com.appl e.sharepoint.group.2)
    I should have access to all mounted volumes:
    drwxrwxr-t 56 root admin - 1972 May 17 13:39 /Volumes/Banana
    drwxrwxr-x 13 mnewman mnewman - 510 Jan 14 09:17 /Volumes/Farang
    lrwxr-xr-x 1 root admin - 1 May 21 10:46 /Volumes/Fuji -> /
    drwxrwxr-x 12 mnewman mnewman - 476 Apr 20 08:29 /Volumes/Guava
    drwxrwxr-t 17 root admin - 646 May 17 13:39 /Volumes/Lime
    If I ssh into Boing, I can get to everything.
    If a different admin user connects to Boing via afp she can get to everything.
    What has happened to my account that permits me afp access only to public shares?

    Amazing:
    I used Apple's Workgroup Manager to add a short name (mgnewman) to my account.
    Using that short name I can now connect to Boing using the Finder's Go->Connect To Server...
    and, all the mounted volumes are shown.
    Workgroup Manager shows "mnewman" as my default short name. But, it doesn't work right
    for afp connections either through the GUI or command line. But, my newly added short user
    name works just fine. (Oddly, my Dot Mac e-mail address, also shown as a short user name in
    Workgroup Manager, also works....)
    I suspect that the Directory Services database is somehow corrupt.
    Is there a way to rebuild it?

  • 10.7: mounting .sparsebundle over AFP

    Hello World,
    I seem to be having difficulties mounting any sort of .sparsebundle image files through an AFP network connection on my MBP OS X 10.7.3. I have tried mounting a .sparsebundle image file as an admin user and as the sudo user without any luck.
    When I run the command below, the image disk, '/Volumes/TestImageVol', seems to mount and shows up on the desktop BUT less then a second later unmounts/disappears. No warning, no nothing!
    bash-3.2# hdiutil attach /Volumes/TestExtHDD/TestImage.sparsebundle/
    /dev/disk1                    Apple_partition_scheme        
    /dev/disk1s1                  Apple_partition_map            
    /dev/disk1s2                  Apple_HFS                                /Volumes/TestImageVol
    bash-3.2#
    I can mount other image files (.DMG) just fine from the exact same location as the .sparsebundle files using the terminal command, hdiutil. I can also copy the .sparsebundle files from the AFP network drive to my MBP's local HDD and then mount them using the hdiutil command.
    The AFP network is running off an older PowerMac G4 OS X 10.4.11 which has a 2TB external HDD connected to it called, "TestExtHDD". The external HDD is holding all the disk images that I am hopping to mount over an AFP network in the near future.
    Here are the deets about the .sparsebundle file:
    - Create on Mac OS X 10.7.3 using Disk Utility v12.1
    - Filename: TestImage.sparsebundle
    - Volume Name: TestImageVol
    - Vol Size: 40MB
    - Format: Mac OS Extended (Journaled)
    - Encryption: none
    - Partiions: Single Partition - GUID Partition Map
    - Image Format: Sparse Bundle Disk Image
    World, any thoughts on why this is happening for only .sparsebundle files?
    PS. Yes I do connect to the AFP network share ("afp://user:pass@domainname/TestExtHDD" --> "/Volumes/TestExtHDD") before I try mounting any image files and yes I have plenty of space on both my AFP server and my MBP HDDs.
    Thanks,
    Sam

    AFP (Apple Filing Protocol ) is ideal – it's provided by netatalk, and can be used by things such as Time Machine.
    Reference
    Time Machine Network Interface Specification (TMNIS): Time Machine Server Requirements

  • Why can I no longer mount shares over AFP?

    Pre-Mavericks, I had two MBP's backing up to an iMac with a 2TB shared USB drive.  It worked flawlessly.
    Then, after all machines were upgraded, this stopped (I know shares now prefer SMB2, and TM only uses AFP -  seems a little counter-intuitive.  I have a 2TB disk, and I'm not going to go spend another 400 GBP on one that has an Apple logo).
    Shortly after the Mavericks upgrade, I could open Safari OR use "Connect to server..." in Finder and type in: afp://iMac.local and mount the share fine (automation removed, tyvm - but it still functioned).
    For the past 6 - 8 weeks, however, that no longer works either, nor does mount_afp. I get chronic 1069 errors no matter what I try.
    I even have old entries where via Browse the paths were "afp://iMac._afpovertcp._tcp.local", but now selecting this only results in a timeout.
    If I select either "smb://iMac._smb._tcp.local", or type in "cifs://iMac.local", then I get a list of the avaiable shared file systems, and things work (but OF COURSE, I cannot use TimeMachine for backups).
    I even tried fiddling with the "sharing" command to enable AFP only for the Backup share, but lo and behold, even after that, I can only attempt to map with "smb://", and I can only mount the share via SMB (as evidenced by the output of "df").  I thought if SMB weren't available, then my understanding was that Mavericks was supposed to fall back to AFP.  I guess not...
    It's like there has been a systematic crippling/removal of AFP, which is fine if you fix TimeMachine. I had to RMA the iMac once, and it was incredibly convenient to be able to tell the OS when booting that I wanted to restore from backup.  It worked seamlessly.  But I don't want to have to disconnect the USB drive and go to each machine individually.  I'm really curious how peoples' TimeCapsules still work?  OR if everything would still be working fine had I not gone to Mavericks on the iMac.
    Does anyone have an explanation?  Is it just GONE??

    any ideas?

  • Permissions re: Mount Volume/Connect to Server

    I wrote a simple little AppleScript to automate users' weekly email backup. the script gets triggered by the user's email client (Entourage)... Here's the script:
    tell application "Finder"
    mount volume "afp://SERVER.ADDRESS/USER BACKUP"
    duplicate folder "USER'S EMAIL FOLDER" of startup disk to folder "USER'S BACKUP FOLDER" of disk "USER BACKUP" with replacing
    end tell
    However, I've noticed that this script only works if I have the user's folder permissions set to "read and write" for everyone (I can't set individual user permissions to restrict access)
    How can I run this script in a way that will authenticate on the fly and then restrict access accordingly?
      Mac OS X (10.4.7)  

    Mount volume doesn't have to go through the finder AFAIK. Also, I'd put the username and password in the applescript.
    mount volume "afp://username:[email protected]/somemountpoint"
    Or if you don't want to put the u/name and password, write a script that prompts for them.
    HTH
    edit: but I think you're right going through the finder, otherwise your your duplicate command would probably not work. It would have to be "do shell script cp blah blah" or "do shell script ditto -rsrcFork blah blah"
    Message was edited by: Ang Moh

  • Finder + ACLs over AFP Mounted Remote Volume

    Hey Guys!
    My Finder is not able to display ACLs on files coming from an AFP mounted volume. The ACLs are there -- ``ls -lef'' displays them correctly. If there some obvious thing here that I'm missing?
    regards,
    P

    Yes, sort of. Whenever you're doing an "opportunistic mount" where the server and client are not joined to the same directory domain, permissions masking will take place. When masking is in effect, it maps access from the currently logged-in user (session owner) on the client to the server share point based on the name and password entered after choosing Go > Connect to Server.
    When dealing with masked permissions, this will be the case:
    * On the client-side, the Finder Info windows may or may not correctly show all ACLs and POSIX permissions of items on the share point. They may simply display effective access - e.g. "you can only read" - without further detail. This depends on the protocol. Typically AFP share points will show correct server-side ACLs and POSIX permissions.
    * On the client-side, listing (ls) the contents of the share point via Terminal will indicate that the session owner has full control and is the "POSIX owner" with others' access at zero (0700). These are the masked permissions, not the real ones.
    * On the server, permissions listed via ls in Terminal or Server Admin's File Sharing section will be the correct ones.
    --Gerrit

  • Searches within InDesign Have Stopped Working on AFP Mounted Volumes On OS X 10.9

    I have run into a new problem since using InDesign CC on a Mac running Mavericks, the search function has ceased working on AFP mounted volumes. For example, when placing an image, if I navigate to a pot of images on my server and then tap in part of the file name within the search field there is nothing found, even though the file name I am searching for is there.
    I have spoken to Adobe technical support who said "well I do apologize for your inconvenience however adobe does not support if the file is on the network. We would be happy to help you if there is any issue with Search if the files are located locally". Slightly frustrating answer!
    This issue looks to be related to the Mavericks operating system as I have Macs running OS X 10.8 which are fine, it is only the OS X 10.9 Macs that have this problem. Is anyone else having these issues?

    I have no problem on two Macs running Mac OS X 10.9.2 with InDesign CC 9.2.
    Have you started by restoring your preferences. Here's how:
    Trash, Replace, Reset, or Restore the application Preferences
    If you use the delete folder method, remember that in OS X 10.9, the <Home> library his hidden. In the Finder, hold down the Option key, and choose Go > Library to make it visible.

  • Yosemite run "mount volumes" is not same as Mountain Lion

    I have a script to mount the shared folder from Windows server (named: servicedesk) as a volume in Yosemite iMac.
    -- -------begin script-----
    set loggedInUser to do shell script "whoami"
    tell application "Finder"
      try
      mount volume "smb://servicedesk/M"
      do shell script "ln -sf /Volumes/M/ ~/Desktop/M"
      end try
    end tell
    ----------End script--------
    When run the script on Mountain Lion 10.8.5 iMac, I can list the "M" when run the command in terminal: ls /Volumes/
    But when run the script on Yosemite iMac, It's show "servicedesk" instead "M" when run the command in terminal: ls /Volumes/
    I don't know why it is difference and can't do anything to create symlink to the Desktop now. Please help????
    Thank you,

    Thanks for your reply @Camelot
    Your reply is solved my question.
    But I'm still wondering why it is same the way of script done (in OS 10.10.1) with 2 targets: shared folder on iMac and shared folder on Windows. The script which "mount volume" on MAC is have expected result, Windows is not. Please see the picture to easier understand
    1/ "Idrive", is mapped from iMAC, "M" is mapped from WIndows
    2/ But when show the result in Terminal, "Idrive" can list, "M" doesn't but it's shown "servicedesk". The icon is also difference on the Desktop!!!
    much appreciate your comments

  • Utility need to saftly mount / repair raid volume over fibre optic

    Hi,
    was wondering if there's any ideas for the following scenario:
    Mac Pro / OS 10.5.x which usually mounts a RAID volume over fibre optic link. The thing is the RAID volume is corrupt, and when any Mac tries to mount it (after being informed that it's damaged, and givent the option to format / ignore...) it crashes.
    Another problem is the only way to access the volume is to mount it on a Mac first because they're the only machines with fiber channel cards.
    The questions are - is there any way to access the volume without crashing the mac?
    Once the volume is accessible, what's the best tool for repairing rAID volumes these days?
    Any thoughts appreciated ( i know this is all a bit vague, just looking for general info, opinions). Many thanks in advance.
    c

    Hello,
    First of all thanks for the reply. The only problem is that I've already tried what you suggested. When I press the option key on the keyboard with the installation cd inserted I see what I am supposed to, the CD, Windows Vista and Macintosh HD. When I select Macintosh HD it does that same thing, goes to the "restart your computer" screen.
    If I try to change the startup disk from the OS X Installation disk the only two volumes that show up are "Windows Vista on Untitled" and the "OS X Installation" disk, no Macintosh HD to even choose. I believe the reason for this is because Macintosh HD but as I have already said, it just can't be mounted.
    I think the reason that Macintosh HD shows up when I press Option at startup is because Apple has hard-coded it in so that it's always there, no matter if you can actually access it or not depending on whether or not it's mounted.
    Right now the best thing for me is to find out how to mount Macintosh HD, if it has to be done manually through Terminal I'll do it, I just need the syntax but something tells me if it doesn't work through GUI it probably won't work through command prompt.
    Anyway, thanks for the reply. Let's hope we get something.

  • Duplicate on mounted volume

    Hi all
    Im putting this script together using AS Studio, the script mounts a volume then goes to a specific folder checks to see if their are files in it that are less than 24 hours old then duplicates them to another folder then unmounts the volume.
    I cant seem to get the files in the folder "Abf:untitled folder:" which are less than 24 hours old to duplicate to folder "Abf:untitled folder 2:", can I get some pointers as to where im going wrong please?
    on clicked theObject
    if name of theObject is "get" then
    tell window "main"
    set Comp_Name to name of current menu item of popup button "COMP"
    set current menu item of popup button "COMP" to first menu item of popup button "COMP"
    end tell
    if (Comp_Name is "ABf") then
    set aDayAgo to the (current date) - 1 * days
    tell application "Finder"
    set myVolume to mount volume "afp://APf:[email protected]/APf"
    delay 5
    get every file of alias "Abf:untitled folder:"
    repeat with thisItem in the result
    if the modification date of thisItem comes after aDayAgo then
    try
    tell application "Finder" to duplicate thisItem to "Abf:untitled folder 2:"
    end try
    end if
    end repeat
    delay 5
    tell application "Finder" to eject "Abf:"
    end tell
    end if
    end if
    end clicked
    Cheers
    Budgie

    Im stumped, and a bit lost, due to my nievity with AS, ive got as far as the below and tried numerous things, but I keep getting the same result.
    AppleScript Error.
    "Finder got an error: Can't get every file of "/Volumes/Absolute Proof/untitled folder/". (-1728)"
    am Im missing the obvious?, or am I a bit thick? (be kind)
    could I get a bit of help with sorting this please?
    on clicked theObject
    if name of theObject is "get" then
    tell window "main"
    set Comp_Name to name of current menu item of popup button "COMP"
    set current menu item of popup button "COMP" to first menu item of popup button "COMP"
    end tell
    if (Comp_Name is "AB-Proof") then
    mount volume "afp://HD:[email protected]/AP"
    delay 5
    set aDayAgo to the (current date) - 1 * days
    tell application "Finder"
    --update folder "AP:untitled folder:"
    run script "Tell app \"finder\" to get every file of POSIX path of alias \"AP:untitled folder:\" "
    repeat with thisItem in the result
    if the modification date of thisItem comes after aDayAgo then
    duplicate thisItem to "AP:untitled folder 2:"
    end if
    end repeat
    end tell
    end if
    end if
    end clicked
    cheers
    Budgie

  • Stumped by mount volume quirk

    Okay, this works fine:
    set Uname to "<my_username>"
    set Pword to "<my_password>"
    set someVolume to "afp://168.116.236.41/MHCProduction"
    mount volume someVolume as user name Uname with password Pword
    If I run this script, the volume in question mounts immediately. However, when I incorporate the above concept into a slightly more involved script, when it gets to the mount volume command it throws up a dialog asking for the server address. The mount volume command is built identically (in fact I cut and pasted it from one script to the other. The only difference is that in the longer script, the URL string in someVolume is read from an external text file and the username and password are initally entered via a dialog box and thereafter stored in properties of the script. Here's the code from the longer script:
    property Uname : missing value
    property Pword : missing value
    global selectedVolumes
    my checkProps()
    tell application "Finder"
    set thePath to (path to application support folder from user domain as string) & "<path:to:textfile>"
    if (exists file thePath) then
    set selectedVolumes to my readPrefs()
    end if
    end tell
    repeat with someVolume in selectedVolumes
    mount volume someVolume as user name Uname with password Pword
    end repeat
    on checkProps()
    if Uname is missing value then
    set Uname to text returned of (display dialog "Enter your Username:" default answer "")
    end if
    if Pword is missing value then
    set Pword to text returned of (display dialog "Enter your Password:" default answer "")
    end if
    end checkProps
    on readPrefs()
    set prefFile to open for access (((path to application support folder from user domain) as string) & "<path:to:textfile>")
    read prefFile using delimiter return
    end readPrefs
    can anyone tell me why the mount volume command goes off without a hitch in the first instance, but not in the second? I've verified that the URL string is correct in the second script using 'display dialog someVolume' right before the mount volume command, and it shows a properly formatted URL string (afp://yadayada/yada).
    Any input greatly appreciated.
    St!ff
    Dual 2.0 GHz Powermac G5   Mac OS X (10.4.4)  

    I've discovered a much quicker and more relaible means to accomplish this:
    property Uname : missing value
    property Pword : missing value
    global selectedVolumes, theIteration
    my checkProps()
    tell application "Finder"
    set thePath to (path to application support folder from user domain as string) & <path:to:textfile>
    if (exists file thePath) then
    set rawData to my readPrefs(thePath)
    end if
    end tell
    set cleanData to (characters (offset of <ServerIP> in rawData) thru -2 of rawData) as text
    set {oldTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set selectedVolumes to text items of cleanData
    set AppleScript's text item delimiters to oldTIDs
    set theIteration to 1
    repeat with someVolume in selectedVolumes
    set theDir to "/Volumes/mntpnt" & theIteration
    set mkdirCmd to "mkdir " & theDir
    set mountCmd to "mount_afp afp://" & Uname & ":" & Pword & "@" & someVolume & " " & theDir
    try
    do shell script mkdirCmd
    do shell script mountCmd
    on error errMsg number errNum
    display dialog "Error! " & errNum & return & errMsg & return & someVolume
    set theCleanupCmd to "rmdir " & theDir
    do shell script theCleanupCmd
    end try
    set theIteration to theIteration + 1
    end repeat
    on checkProps()
    if Uname is missing value then
    set Uname to text returned of (display dialog "Enter your Username:" default answer "")
    end if
    if Pword is missing value then
    set Pword to text returned of (display dialog "Enter your Password:" default answer "")
    end if
    end checkProps
    on readPrefs(somePath)
    set prefFile to open for access somePath
    set theData to read prefFile
    close access prefFile
    return theData
    end readPrefs
    Dual 2.0 GHz Powermac G5   Mac OS X (10.4.4)  

  • Mount Volume

    On a iMac running SL, I want to automount a network volume and place it on the desktop for ANY user to see.  However, I want the student to click on it the mounted volume and enter there own login information.  I can add the network volume to Login Items but I want the student to logon to the volume with there own information.
    For example, take a network volume called OUSER and I add it to the Login Items.  I want Mary (student) to logon to the Mac and I want Mary to see the OUSER (network volume) and I want Mary to enter her username and password. 
    I want the network volume to be on the desktop regardless of which student logon on to the network.  Next, I want the student to click on the network volume and a dialog box appears asking for them to logon.
    Do I make sense? I don't want the teacher to ask every student to perform the GO-Connect to Server- logon- select the network volume.  I want the network volume to appear on every user's desktop and logon to the network volume.

    Go to Safari
    Enter: afp://server
    Drag the URL from the URL field to the desktop.  This will create a Safari shortcut, that will mount the specified AFP file server
    Replace afp with smb if you want to use a CIFS/SMB server.
    You could do something using an Automator Workflow app.  The easiest way that I know of is to use "Run Shell Script" specifying:
    open afp://server
    -OR-
    open smb://server
    There may be fancier ways to do this with Automator.
    There is also Applescript, but I'm weak with Applescript.  But I'm sure a Google search would turn something up.

  • Delete File From Mounted Volume

    Hey,
    I am trying to delete the "Calendar Cache" files on both my laptop PowerBook G4 and the Mac Pro Quad that I sync my calendars with. I am using ChronoSync and the individual calendars sync fine, but there is a little house keeping needed with the cache file. They need to be deleted on both systems in order to "refresh" the views of the calendars.
    So after the sync of calendars, I have the software initiating an AppleScript that deletes both. Here's the script:
    +(* PowerBook Files / delete cache file *)+
    +(* Please note that both systems have the same username. This may be arise a conflict *)+
    +tell application "Finder"+
    + activate+
    + tell application "Finder" to delete file "Calendar Cache" of folder "Calendars" of folder "Library" of disk "useranthony"+
    +end tell+
    +(* Mac Pro Quad/ delete cache file *)+
    +tell application "Finder"+
    + mount volume "afp://10.10.10.1/anthonyabraira"+
    + tell application "Finder" to delete file "Calendar Cache" of folder "Calendars" of folder "Library" of disk "/volumes/useranthony"+
    +end tell+
    I am having trouble addressing a deletion on the networked Mac Pro Quad.

    why send it to the trash — just delete it...
    (* PowerBook Files / delete cache file )
    try
            do shell script "rm -rf /Library/Calendars/Calendar\\ Cache"
    end try
    you may need a delay for the Mac Pro Quad to mount
    ( Mac Pro Quad/ delete cache file *)
    --the mount and then the delay
    delay 4
    try
            do shell script "rm -rf /THE-CORRECT/PATH-HERE/Library/Calendars/Calendar\\ Cache"
    end try
    Tom

  • Information about mounted volumes

    Hi,
    I am trying to write an Applescript to quickly generate links to files on mounted volumes, which then can be pasted into emails.
    I would like to have the user select a file/folder on the mounted volume; when he executes the script (either from the script menu, or as an Automator action), it would copy the full path (ie afp://server.local/file) into the clipboard.
    The information is accessible from the "Get Info" window, but I can't find a way to read it in AppleScript.
    Any thoughts and pointers are appreciated.
    Best regards // Pascal

    Hi Budgie,
    thanks for the link. Unfortunately the solutions mentioned on that page stop at providing the POSIX path (/Volumes/share/file). I would need to get some information about the actual server, from which the share is mounted.
    Thanks for the tip though.
    //pascal
    Message was edited by: Pascal Wever

Maybe you are looking for

  • Transporting Webservice DataSources -

    Hi We are unable to successfully transport any of our webservice Datasources, or anything related to them. The tansport logs are not giving any exact clue about why the error is occuring, and what we can do about it... Is there any specific technique

  • How do I get my documents to open on 'pages'?

    I started writing a college essay today and after doing the introduction the document wont open and it wont tell me why it wont open. My other document still opens fine but if this is going to be a re-occurring problem then I don't want to use this a

  • LINQ: Update a column with auto increment value

    Hi All, Greetings. I am very new to C# (though with lot of experience in VC++). Now a days, I am engaged in a C# project where I need to deal with ADO.NET DataTable and related classes. I am stuck up in a scenario as follows: I have a data table (of

  • IPhoto '08 won't save photos

    After installing iPhoto '08 over the previous version, which was working properly, I can't seem to save the photos I download from my camera. I get this message: "Some recent changes may be lost. Make sure your hard disk has enough space and that iPh

  • Best settings for Handbrake

    I've converted a number of movies to my iPod and they all work perfectly. After a lot of experimentation, I've found that using MPEG-4 at 90% Constant Quality is my preferred method. Here's why: * MPEG-4 rips a **** of a lot faster. * I can rip the f