从用户root运行pyspark2时,权限被拒绝

时间:2018-12-13 09:16:38

标签: python python-3.x apache-spark pyspark cloudera

我试图从user = root运行pyspark2,但出现权限被拒绝错误。还不知道为什么会发生此错误。

[root@quickstart cloudera]# pyspark2
env: /usr/local/bin: Permission denied

我授予777访问此文件夹/ usr / local / bin的权限。没有帮助。

[root@quickstart cloudera]# ls -la /usr/local/bin
total 19636
drwxrwxrwx.  3 root root    4096 Dec  5 01:33 .
drwxr-xr-x. 15 root root    4096 Sep 19 05:40 ..
-rwxrwxrwx   1 root root     101 Nov  5 07:29 2to3-3.6
-rwxrwxrwx   1 root root     242 Jun 29 07:44 easy_install-3.6
-rwxrwxrwx   1 root root      99 Nov  5 07:29 idle3.6
-rwxrwxrwx   1 root root    1675 Dec  5 01:33 jp.py
-rwxrwxrwx   1 root root     216 Nov  5 07:43 pip
-rwxrwxrwx   1 root root     216 Nov  5 07:43 pip3
-rwxrwxrwx   1 root root     216 Nov  5 07:43 pip3.6
drwxrwxrwx   2 root root    4096 Dec  5 01:33 __pycache__
-rwxrwxrwx   1 root root      84 Nov  5 07:29 pydoc3.6
-rwxrwxrwx   2 root root 9998398 Nov  5 07:28 python3.6
-rwxrwxrwx   2 root root 9998398 Nov  5 07:28 python3.6m
-rwxrwxrwx   1 root root    3103 Nov  5 07:29 python3.6m-config
-rwxrwxrwx   1 root root     441 Nov  5 07:29 pyvenv-3.6
-rwxrwxrwx   1 root root     714 Dec  5 01:33 rst2html4.py
-rwxrwxrwx   1 root root    1139 Dec  5 01:33 rst2html5.py
-rwxrwxrwx   1 root root     594 Dec  5 01:33 rst2html.py
-rwxrwxrwx   1 root root     791 Dec  5 01:33 rst2latex.py
-rwxrwxrwx   1 root root     600 Dec  5 01:33 rst2man.py
-rwxrwxrwx   1 root root    1698 Dec  5 01:33 rst2odt_prepstyles.py
-rwxrwxrwx   1 root root     764 Dec  5 01:33 rst2odt.py
-rwxrwxrwx   1 root root     601 Dec  5 01:33 rst2pseudoxml.py
-rwxrwxrwx   1 root root     637 Dec  5 01:33 rst2s5.py
-rwxrwxrwx   1 root root     871 Dec  5 01:33 rst2xetex.py
-rwxrwxrwx   1 root root     602 Dec  5 01:33 rst2xml.py
-rwxrwxrwx   1 root root     670 Dec  5 01:33 rstpep2html.py

当我尝试运行pyspark时-它可以运行并运行pyspark 1.6 defauls shell。

[root@quickstart cloudera]# pyspark 
WARNING: User-defined SPARK_HOME (/opt/cloudera/parcels/CDH-5.13.3-1.cdh5.13.3.p0.2/lib/spark) overrides detected (/usr/lib/spark). 
WARNING: Running pyspark from user-defined location. Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)

我尝试设置环境变量,但未能解决问题,即使pyspark for 1.6也给我权限被拒绝的错误:

SPARK_HOME=/opt/cloudera/parcels/SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101/lib/spark2

[root@quickstart cloudera]# pyspark
env: /usr/local/bin: Permission denied

我也尝试出口,但没有运气:

PYSPARK_PYTHON=/usr/local/bin/python3.6
PYTHONPATH=/opt/cloudera/parcels/SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101/lib/spark2/python:/opt/cloudera/parcels/SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101/lib/spark2/python/build:

我的环境是:

  • CDH 5.13.3
  • Python 3.6
  • 带有python 2.6.6的默认centos 6.7
  • Spark 1.6
  • Spark2 2.3.0

0 个答案:

没有答案