Intellij can't access /usr/local on Mac (10.7.5) - macos

My copy of Intellij IDEA CE 12.0.1 (Build 123.94) can't access /usr/local. I scoured the internet and no one else had this problem before. I know that it has something to do with folder permissions because IDEA can access the folder when I ran using sudo. My workaround was to match the folder permissions to a folder accessible to IDEA, but it didn't resolve the issue. The current permissions are as follows:
$ drwxr-xr-x# 25 sergeykoulikov staff 850 14 Dec 12:24 /usr/local
Which is almost the same as my Inbox folder, which IDEA can access.
$ drwxr-xr-x 10 sergeykoulikov staff 340 12 Jan 17:05 /Users/sergeykoulikov/Inbox
What am I missing? Thank you for your help in advance.

The question doesn't have enough information to give a specific answer, but I can point you at things to investigate. First, the "#" after the permissions on /usr/local indicates it has extended attributes, and maybe also an access control list (essentially, extended permissions); it's also possible the folder may have flags set, which can change its behavior. To see all of these things, use ls -ldeO# /usr/local
If that doesn't point you at the problem, clarify what you mean by "access". Exactly what is IDEA doing in the two folders? Is it doing (/trying to do) the same thing in both folders? Is it trying to access the files inside the folders, and if so are the permissions on the files the same and/or is there a file that's present in one folder but not the other that's causing the difference?

Related

winutils.exe chmod command doesn't set permission

> D:\>echo %HADOOP_HOME%
> D:\Apps\winutils\hadoop-2.7.1
Create tmp/hive folders on the same disk as HADOOP_HOME
D:\>dir tmp\hive
Directory of D:\tmp\hive
06/13/2016 01:13 PM <DIR> .
06/13/2016 01:13 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 227,525,246,976 bytes free
Try to figure out what permission are set
D:\>winutils.exe ls \tmp\hive
FindFileOwnerAndPermission error (1789): The trust relationship between this workstation and the primary domain failed.
When I tried chmod for this folders it seems work
winutils.exe chmod 777 \tmp\hive
but ls shows same exception
Does anyone has an idea what is going on ? Moreover, It works for me a couple hours ago but now my spark application fails with an exception
java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rw-rw-rw-
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)
I am quite late here still posting it so it might help someone in future.
While setting the permission, make sure you are using correct path for winutils.exe (try to use complete path). For me winutils.exe was in C drive:
C:\path\to\winutils.exe chmod -R 777 C:\tmp\hive
Run the below command to check the permission and it should look like below image ([setting and checking the permission : click to see the image]):
https://i.stack.imgur.com/vE9vl.png
If this is your corporate system the you must be on the same network using VPN or Forti Client or any other tool your organisation has been using
https://support.microsoft.com/en-us/kb/2771040
Looks like domain access issues, please ensure you can access domain and take a try again.
After ensure domain access, below error disappear
Caused by: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions a
re: rw-rw-rw-
I'm late here and I just encountered this issue. Writing this so it will help somebody.
If you are using your office laptop, make sure you are connected to office network and retry. The domain Member of Domain settings point to your office network. That must solve the issue.
Log on Windows 10 using local Administrator account
Hold Windowslogo and press E to open File Explorer
3.On the right side of the File Explorer right click on This PC and choose Properties Click Advanced System Settings
Choose Computer Name tab and select change to see the value configured.
I am a newbie here, so it might be wrong but I think you need to add -R in the command as below:
winutils chmod -R 777 \tmp\hive

ftpd can't change root directory when connecting as a non-root user

I have an embedded system running linux and I have busybox installed for running different services. One of the services is ftpd, which I start like this from the etc/init.d/rcS file:
tcpsvd 0.0.0.0 21 ftpd -w -v /mnt/flash&
I have two users in the system, root and a regular user. Root user can easily connect to the FTP server, but when I try to login with the regular user's credentials, I get this error:
ftpd[678]: can't change root directory to '/mnt/flash': Operation not permitted
Now, I thought that it must be a directory permission problem, and I started with changing permissions on the /mnt/flash directory first, but after this didn't work, I ended up having all my files in file-system including / to be owned by this regular user and have drwxrwxrwt permissions (just to find the cause of the problem). But I still get this error.
I have also tried to start ftpd with different root folders, including /.
I also couldn't find any config files for the ftpd in my file-system, maybe I need to create one manually? If so, which one and how to tell ftpd to allow user logins?
I'd really appreciate any help. Thanks.
Well, after trying some random things, I discovered that user login works fine if there is no directory changing involved at all:
tcpsvd 0.0.0.0 21 ftpd -w -v &
I suspect that chroot is called otherwise and the user does not have a right to do that.

How to give apache the right to write in the Document root on Mac Os 10.8 ( Mountain Lion)

I'm having a lot of issues with PHP and Apache while using os-x mountain lion. Basically my plugin needs wordpress to move some files but it always ask for ftp server credential, like if apache doesn't have permission to write those directories.
Apache is running with
User daemon
Group daemon
if i do
ls -lad htdocs/
i get
drwxrwxr-x 7 root staff 238 13 Ago 21:51 htdocs/
i'm using zend server ce 5.6. What should i do to make sure that apache has full rights to do everything? I would give it root access (it' my dev machine and i must get things working, so i don't care about security issues, but i don't know how to that, if i can do it in a cleaner why i'd be happy but i need this to work )
Your htdocs directory is owned by root, and in the group staff. User permissions on it are rwx, group permission are rwx, and world permissions are rx. So apache needs to be run as either user root or group staff to have full read/write/execute permissions. Otherwise change the owner and/or group of your htdocs directory to daemon and apache will have full rwx permissions. If you really don't care about security at all, just do chmod 777 htdocs (not recommended).
WordPress isn't really checking if it has the right to write in a directory (it's the same for plugin installation), it's only checking if the user and group it's running through Apache is the same that the parent folder.
So the only way is indeed to chmod the folder to your Apache user/group

How to configure Mac MAMP so I don't have to 777 folders

At the moment I'm working with a git repo, locally so I don't to change any permissions before I push the files.
I'm using MAMP on OSX 10.6.8. I'm sure there must be something that I'm doing wrong. I would like the web pages to be able to write to folders while maintaining 755 permissions on the folders.
NB: MAMP is installed in Applications, but I have the root directory in a folder on my user folder.
What is user of process running Apache?
You must change user or group to apache process and You will have access to files and
apache process to.
Example:
$ ls -ld incomming
drwxrwxr-x 42 john apache 4096 May 20 07:33 incomming
This folder onwner is John, and his have full write permmissions. Also this folder is writable by group apache, which is supposed to be apache process group.

what is oradiag_<user> folder?

I see these in the my Linux folder hierarchy after installing the Zend Framework.
/oradiag_root/
/user/myuser/oradiag_myuser/
/user/myuser/oradiag_root/
This name reminds me of Oracle. But I did not find any official documentation about this.
I didn't install any Oracle server. What's going on here?
I never installed Oracle on my system and don't know why these directories kept being created, but I finally managed to stop them from reappearing. Here's how it's done.
First, head over to:
cd ~/oradiag_<username>/diag/clients/user_<username>/host_*/trace/
and then
head sqlnet.log
You should see an error message complaining about a directory not existing for r/w. For me, it was /usr/lib/log. I created the directory it was complaining about and deleted the oradiag_<username> directory, only to have it reappear later; however, the sqlnet.log file was now complaining about a different directory.
I repeated this process of creating directories a few times until the directory finally stopped appearing. In your case, the directories may be different, but here's what solved it for me:
sudo mkdir /usr/lib/log/diag/clients
sudo chmod 777 /usr/lib/log/diag/clients
Only the clients directory needs to be 777, apparently.
Now just wipe out the oradiag_<username> directories wherever they currently appear. They shouldn't pop up for you again.
In case you're curious, here's what finally ended up being written to that "missing" directory:
mike#mike-ubuntu:/usr/lib/log/diag/clients$ ll -a
total 8
drwxrwxrwx 2 root root 4096 2011-08-24 10:34 .
drwxr-xr-x 3 root root 4096 2011-08-24 10:34 ..
Brilliant.
There are a lot of suggestions out there, but the only one that worked for me was this.
In Oracle 11gR1 and higher, you have to add this to your sqlnet.ora file first:
DIAG_ADR_ENABLED=OFF
After that, then other log-disabling settings should work:
TRACE_LEVEL_CLIENT = OFF
TRACE_DIRECTORY_CLIENT=/dev/null
LOG_DIRECTORY_CLIENT = /dev/null
LOG_FILE_CLIENT = /dev/null
LOG_LEVEL_CLIENT = OFF
The logs that are created are for the Oracle client. The logs may show up when any program tries to access an Oracle database.
These folder are created by the Oracle 11 SQL*Net if sqlnet.ora is not available or does not define the parameter ADR_BASE (see http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIDEAFI).
If you've installed the Zend Framework, it appears to create these directories.

Resources