当我在Windows上使用git over samba share时,当我想通过git_extentions或tortoiseGIT提交文件时,我会收到错误.错误是: 错误:无法写入sha1文件名.git/objects/b4/e819f886bf31b67c42249a0eff8e8b16cf7622:权限被拒绝.当我通过ubuntu服务器添加文件并提交文件时,它工作正常.我也在班里工作.
我已经尝试过了chmod 777 the whole .git folder.
我想设置系统时钟SystemClock.setCurrentTimeMillis,但遇到以下错误:
"Unable to open alarm driver: Permission denied"
Run Code Online (Sandbox Code Playgroud)
以下是setCurrentMillisAndroid开发者网站的API 说明:
public static boolean setCurrentTimeMillis (long millis)
Run Code Online (Sandbox Code Playgroud)
从以下版本开始:API Level 1设置当前的挂起时间,以毫秒为单位.要求调用进程具有适当的权限.
如果时钟成功设置为指定时间,则返回.
因此,应用程序需要获取设置时间的权限.在我插入的AndroidManisfest.xml中,android.permission.SET_TIME但是我有相同的消息错误.
我已尝试在互联网上找到各种解决方案,似乎即使在android.permission.SET_TIME引入的FroYo(Android 2.2)上也无法设置没有root的系统时间,正常的应用程序因为/ dev/alarm文件而无法获得此权限664 permission.因此,解决方案是更改权限666但需要root设备,并且太具有侵入性,无法成为解决方案.
我想为我的公司创建一个App来同步不同系统之间的数据,这对于同步时钟至关重要.
提前感谢您的意愿
日食
我正在尝试以编程方式安装应用程序而无需用户交互,我收到此错误
SecurityException: Neither user 10057 nor current process has android.permission.INSTALL_PACKAGES
Run Code Online (Sandbox Code Playgroud)
我的安装程序位于root系统上的/ system/app中,选中"安装非市场应用程序",安装程序具有权限
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
Run Code Online (Sandbox Code Playgroud)
这是我的通话功能
private void puk(Context context) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException{
String fileName = PAKAGE_FILE_NAME ;
String dir_type = Environment.DIRECTORY_DOWNLOADS;
File dir= Environment.getExternalStoragePublicDirectory(dir_type);
java.io.File file = new java.io.File(dir ,fileName);
Uri packageUri = Uri.fromFile(file);
PackageManager pm = context.getPackageManager();
Class<? extends PackageManager> o = pm.getClass();
Method[] allMethods=o.getMethods();
for (Method m : allMethods) {
if (m.getName().equals("installPackage")) {
Log.e(TAG, "installing the app.." );
m.invoke(pm,new Object[] { packageUri, null, 1, "com.mic.zapp"});
break;
} …Run Code Online (Sandbox Code Playgroud) 这很简单,但不起作用.我正在尝试创建一个临时文件(以后是永久存储文件)来预览MP3文件.我尝试了以下后缀的变种,如下例所示:
public class StudyFileIo extends Activity {
private static final String TAG = "StudyFileIo";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try {
File tempFooFile = File
.createTempFile("foo", "dat");
Log.i(TAG, tempFooFile.getAbsolutePath());
} catch (IOException e) {
Log.e(TAG, e.toString());
e.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud)
日志:
09-07 11:25:20.299 E/StudyFileIo( 8859): java.io.IOException: Permission denied
09-07 11:25:20.299 W/System.err( 8859): java.io.IOException: Permission denied
09-07 11:25:20.299 W/System.err( 8859): at java.io.File.createNewFileImpl(Native Method)
09-07 11:25:20.299 W/System.err( 8859): at java.io.File.createNewFile(File.java:1160)
09-07 11:25:20.299 W/System.err( 8859): at java.io.File.createTempFile(File.java:1224)
09-07 11:25:20.299 W/System.err( …Run Code Online (Sandbox Code Playgroud) 我有一些使用shutil.copyfile的python代码:
import os
import shutil
src='C:\Documents and Settings\user\Desktop\FilesPy'
des='C:\Documents and Settings\user\Desktop\\tryPy\Output'
x=os.listdir(src)
a=os.path.join(src,x[1])
shutil.copyfile(a,des)
print a
Run Code Online (Sandbox Code Playgroud)
它给了我一个错误:
IOError: [Errno 13] Permission denied: 'C:\\Documents and Settings\\user\\Desktop\\tryPy\\Output'
Run Code Online (Sandbox Code Playgroud)
为什么我没有权限复制文件?
我正在尝试使用Android Studio 2.3的avdmanager (通过命令行)创建一个虚拟的android设备
所有命令都以root用户身份执行
当我尝试通过$ ~/Android/Sdk/tools/./emulator @Nexus_5X_Api_23_x86输出启动模拟器时:
$ kvm-ok
我正在使用64位的Ubuntu 16.04服务器,Android Studio是通过x11转发启动的,因此使用了我的桌面环境(这也是ubuntu 16.04,64位!)
当我打字时/dev/kvm它给了我:
emulator-check
要证明我尝试访问的.avd存在:
~/Android/Sdk/tools/./emulator @Nexus_5X_Api_23_x86 -verbose
给出输出:
$ ~/Android/Sdk/tools/./emulator @Nexus_5X_Api_23_x86
进一步的权限$ kvm-ok是:
/dev/kvm
表演emulator-check给了我:
~/Android/Sdk/tools/./emulator @Nexus_5X_Api_23_x86 -verbose
我真的不知道该怎么做,在整个论坛上搜索但没有找到我的系统的这个问题的复制品,其他系统上同样问题的修复对我来说不起作用,已经尝试完全清除并重新安装所有qemu,libvirt,libvirtd和kvm软件包,但没有成功.
任何帮助表示赞赏!!
编辑:
$ ~/Android/Sdk/tools/./emulator @Nexus_5X_Api_23_x86给我,
以下输出:
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn't have permissions to use KVM (/dev/kvm)
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Docker 运行中挂载一个目录:
docker run --restart always -t -v /home/dir1/dir2/dir3:/dirX --name [...]
Run Code Online (Sandbox Code Playgroud)
但我收到错误:
error while creating mount source path '/home/dir1/dir2/dir3': mkdir /home/dir1/dir2/dir3: permission denied.
Run Code Online (Sandbox Code Playgroud)
所有目录都确实存在,奇怪的是当尝试挂载 dir2 而不是 dir3 时,它工作正常:
docker run --restart always -t -v /home/dir1/dir2/:/dirX --name [...] # THIS IS WORKING
Run Code Online (Sandbox Code Playgroud)
所有目录(“dir2”和“dir3”)都具有相同的权限:drwxr-x---
关于可能出现的问题有什么建议吗?为什么一个在工作而另一个不工作?谢谢
尝试安装Laravel时出现以下问题(http://laravel.com/)
任何帮助将不胜感激.
未处理的异常
信息:
file_put_contents(/ Users/alvincrespo/Sites/apollo/storage/views/26bdebca7505781c753aa21663170a1b)[function.file-put-contents]:无法打开流:权限被拒绝位置:
/Users/alvincrespo/Sites/apollo/laravel/blade.php第63行堆栈跟踪:
#0 /Users/alvincrespo/Sites/apollo/laravel/laravel.php(40):Laravel\Error :: native(2,'file_put_conten ...','/ Users/alvincre ...',63)#1 [内部函数]:Laravel {closure}(2,'file_put_conten ...','/ Users/alvincre ...',63,Array)#2 /Users/alvincrespo/Sites/apollo/laravel/blade.php( 63):file_put_contents('/ Users/alvincre ...','...')#3 [内部函数]:Laravel {closure}(对象(Laravel\View))#4/Users/alvincrespo/Sites/apollo /laravel/event.php(199):call_user_func_array(Object(Closure),Array)#5 /Users/alvincrespo/Sites/apollo/laravel/event.php(138):Laravel\Event :: fire('laravel.view .en ...',Array,true)#6 /Users/alvincrespo/Sites/apollo/laravel/view.php(325):Laravel\Event :: until('laravel.view.en ...',Array )#7 /Users/alvincrespo/Sites/apollo/laravel/view.php(546):Laravel\View-> render()#8 /Users/alvincrespo/Sites/apollo/laravel/response.php(246):Laravel\View - > __ toString()#9 /Users/alvincrespo/Sites/apollo/laravel/laravel.php(138):Laravel\Response-> render()#10/Users/alvin crespo/Sites/apollo/public/index.php(34):require('/ Users/alvincre ...')#11 {main}
我正在尝试使用新的ugc端点在linkedin上创建视频发布
创建此类帖子有两个步骤
1)。将视频资产上传到linkedin服务器上(完成)
2)。向带有请求主体的ugc端点发出请求
我已经成功上传了视频,但收到ugc发布请求的身份验证错误。错误是
{
"message": "urn:li:developerApplication:<id1> does not have permission to create ugc posts with author: li:member:<id2>",
"status": 401
}
Run Code Online (Sandbox Code Playgroud)
我正在按照linkedin api文档中的建议传递请求正文。
{
"author": "urn:li:person:<id>",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"media": [
{
"title": {
"attributes": [],
"text": "Sample Video Create"
},
"description": {
"attributes": [],
"text": "Sample Description"
},
"media": "urn:li:digitalmediaAsset:<asset_id>",
"thumbnails": [],
"status": "READY"
}
],
"shareCommentary": {
"attributes": [],
"text": "Some share text"
},
"shareMediaCategory": "VIDEO"
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
},
"targetAudience": …Run Code Online (Sandbox Code Playgroud) 我是 Git 和 GitHub/GitLab 的新手。我尝试将我的项目共享到 GitHub,但它引发了此异常:
Can't finish GitHub sharing process
Successfully created project 'LiveGame1' on GitHub, but initial push failed:
git@github.com: Permission denied (publickey).
Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我也可以通过互联网链接克隆存储库,但不能通过“git@github.com:/username/repository_name”。
我该如何修复这个错误,我能否将我的项目直接分享到 GitLab?
android ×3
installation ×2
linux ×2
permissions ×2
ubuntu ×2
containers ×1
docker ×1
file-io ×1
git ×1
github ×1
gitlab ×1
kvm ×1
laravel ×1
linkedin ×1
linkedin-api ×1
php ×1
python ×1
repository ×1
samba ×1
shutil ×1