2013-07-27 41 views
17

Tôi đã tạo linux (Centos) trên hộp ảo của mình. Khi tôi ssh vào nó và tôi cố gắng tạo liên kết tượng trưng (trên thư mục chia sẻ của tôi với quyền truy cập đầy đủ):tạo liên kết tượng trưng: Lỗi giao thức

ln -s path/folder/example myFolder 

tôi nhận được lỗi:

ln: creating symbolic link `myFolder': Protocol error 

Có bất kỳ lý do nào giải pháp này?

+0

Were bạn có thể giải quyết vấn đề này? Tôi cũng thấy vấn đề tương tự 'root @ 57856515e02b:/artifacts/test/install/lib # ln -s /usr/share/tcltk/tcl8.5/artifacts/test/install/lib/ ln: không tạo liên kết tượng trưng '/artifacts/test/install/lib/tcl8.5': Lỗi giao thức ' –

Trả lời

13

Đó là sự cố với hệ thống tệp lưu trữ. Kiểm tra các điều khoản trên thư mục máy chủ là đầy đủ và hệ thống tập tin lưu trữ hỗ trợ các liên kết tượng trưng.

+0

Hệ thống máy chủ là cửa sổ 7. Có giải pháp nào để kích hoạt nó không? –

+4

Giải pháp tồi cho việc này là tạo các liên kết tượng trưng trong các cửa sổ 7 bằng cách sử dụng mklink. Ví dụ: mklink/D myFolder đường dẫn/thư mục/ví dụ –

+0

từ đó API/lớp nào thông báo 'Protocol error' đến từ đây? – n611x007

17

Nhấp chuột phải vào dấu nhắc lệnh của bạn và "Chạy với tư cách quản trị viên" (hoặc bất kỳ chương trình nào bạn đang sử dụng để làm cho các liên kết tượng trưng đó cần phải chạy dưới dạng quản trị viên).

+0

Đây là một hệ thống Linux, có nghĩa là không có "Command Prompt". – Signus

+6

Trên thực tế, lỗi giao thức trong việc tạo các liên kết tượng trưng là phổ biến đối với các hộp ảo đang chạy trên các cửa sổ. Chạy trình bao như quản trị viên thường sửa vấn đề. – baaj

+0

Tôi gặp vấn đề tương tự nhưng khi bạn chạy VM với tư cách quản trị viên, bạn có thể tạo liên kết tượng trưng. Để biết thêm thông tin, hãy xem: http://stackoverflow.com/a/28674584/1494559 – np20

8

Dưới đây là giải pháp trong một vé trên virtualbox.org: https://www.virtualbox.org/ticket/10085#comment:32 (Lưu ý: Thực hiện "whoami/priv" trong giao diện điều khiển với quyền hành chính)

I have done some Windows research on this bug.

If your user is of the Administrator type (rather than a Standard account), there's no way to run VB with symlinks working without the UAC prompt.

If you have a Standard user account (or if you are willing to switch your account to Standard and create a separate Admin account), the solution exists. You will, however, need admin privileges to accomplish several of the steps (not necesarrily for your user account).

  1. Run the Local Security Policy (Win+R, type "secpol.msc", confirm UAC). Then navigate to "Local Policies->User Rights Assignment".
  2. Find the permission called "Create symbolic links" and double-click it. Add your user to the list of objects having this permission. Or you can add the "Users" group. Log off and log on. You can check the success by running in console:

    whoami /priv 
    

    If you see the privilege SeCreateSymbolicLinkPrivilege enabled, you've done well.

  3. Make sure your user has proper access to the shared folder on host system.

  4. As mentioned here earlier, execute

    VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1 
    

    in a console from the C:\Program Files\VirtualBox folder. Don't forget to substitute VM_NAME with the name of your VM and SHARE_NAME with the name of the shared folder (as it appears in the VM settings).

  5. You're done.

If you happen to own one of the "lesser" version of windows (e.g. 7 Home), you don't have the "secpol.msc" utility. See How do I grant SeCreateSymbolicLink on Windows Vista Home edition for help.

+0

Cảm ơn, hãy sử dụng secpol.msc và tự cung cấp cho riêng mình. Làm việc hoàn hảo. – partyd

+0

Cảm ơn bạn đã làm việc cho tôi – abulbul

-2

tìm tập tin cmd.exe. Nhấp chuột phải vào cmd.exe. Chọn tùy chọn trình đơn "Chạy với tư cách quản trị viên". Nó sẽ hoạt động hoàn hảo.

+1

Bạn có vẻ bối rối; tại sao bạn mong đợi một hộp CentOS để có một 'cmd.exe', và làm thế nào để bạn mong đợi" Nhấp chuột phải "được thực hiện trong một phiên SSH? –

1

Theo tôi được biết, Windows VirtualBox host không hỗ trợ liên kết (từ https://www.virtualbox.org/manual/ch04.html#sharedfolders)

Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:

The host operating system must support symlinks (i.e. a Mac, Linux or Solaris host is required).

Currently only Linux and Solaris Guest Additions support symlinks.

For security reasons the guest OS is not allowed to create symlinks by default. If you trust the guest OS to not abuse the functionality, you can enable creation of symlinks for "sharename" with:

VBoxManage setextradata "VM name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/sharename 1

Các vấn đề liên quan