获取FileSystemException“客户端不拥有所需的权限”在Play Framework中使用Files.createSymbolicLink [英] Getting FileSystemException "A required privilege is not held by the client" using Files.createSymbolicLink in Play Framework

查看:1034
本文介绍了获取FileSystemException“客户端不拥有所需的权限”在Play Framework中使用Files.createSymbolicLink的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用新的Java 7 Files.createSymbolicLink()方法!框架,我得到以下异常:

I'm trying to use the new Java 7 Files.createSymbolicLink() method within Play! Framework, and I got the following exception:

RuntimeException occured : java.nio.file.FileSystemException: c:\work\foo\bar:
A required privilege is not held by the client.

这是我第一次遇到Java的权限模型,所以我明白了发生了什么,但是没有还知道如何修复它(我想给控制器更多的权限)。

This is my first encounter with Java's permission model, so I understand what's going on, but don't yet know how to fix it (I'd like to give the Controllers more permissions).

如果有人能在这里回答的速度比我找到的答案快,我(和未来的读者)将不胜感激。

If anyone can answer here faster than I'll find the answer, me (and future readers) will be grateful.

推荐答案

这不是java权限的问题,而是操作系统的问题权限。请参阅 FileSystemException

This isn't a problem with java permissions, but a problem with the operating system permissions. See FileSystemException.

FileSystemException的子类有:AccessDeniedException,AtomicMoveNotSupportedException,DirectoryNotEmptyException,FileAlreadyExistsException,FileSystemLoopException,NoSuchFileException,NotDirectoryException,NotLinkException。

The subclasses of FileSystemException are: AccessDeniedException, AtomicMoveNotSupportedException, DirectoryNotEmptyException, FileAlreadyExistsException, FileSystemLoopException, NoSuchFileException, NotDirectoryException, NotLinkException.

来自AccessDeniedException :

From AccessDeniedException:

文件系统操作被拒绝时检查的异常,通常是由于文件权限或其他访问检查。
此异常与访问控制器或安全管理器在拒绝访问文件时抛出的AccessControlException或SecurityException无关。

Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check. This exception is not related to the AccessControlException or SecurityException thrown by access controllers or security managers when access to a file is denied.

这篇关于获取FileSystemException“客户端不拥有所需的权限”在Play Framework中使用Files.createSymbolicLink的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆