I have been working on a project and since last week xcode does not let me make any changes in my xib file and another page in the project. However I can make changes in other pages. When I open it as root I can make changes in main.xib as well. What can cause this? It is very annoying.
This is what I get:
“MainWindow.xib” is locked for editing and you may not be able to save your changes. Do you want to unlock it?
Sounds like you have lost ownership of your own files (or some reason). You can confirm this from the command line by simply listing them (ls), for example:
$ ls -l
total 184
-rwxr-xr-x 1 andy staff 2731 7 Dec 2010 AppDelegate.h
-rwxr-xr-x 1 andy staff 3976 7 Dec 2010 AppDelegate.m
-rwxr-xr-x 1 andy staff 2625 7 Dec 2010 Choices.h
...
My username is 'andy', so I already own these files, however if I didn't, I could change ownership of the whole directory hierarchy using chown as root:
$ ls -l
total 0
drwxr-xr-x 12 andy staff 408 15 Dec 2010 CFLocalServer
drwxr-xr-x 23 andy staff 782 18 Dec 2010 GridMenu
drwxr-xr-x 12 andy staff 408 16 Dec 2010 Hello
drwxr-xr-x 16 andy staff 544 18 Dec 2010 NSTableViewBinding
drwxr-xr-x 18 andy staff 612 18 Dec 2010 OpenCL_OceanWave
$ sudo chown -R andy:staff *
Password:
$
You can do this using Finder, but that isn't so easy to explain.
Ultimately you need to find out why you lost ownership as currently you are not in control of your own machine, it is in control of you.
Related
I have a VueJS app hosted on Firebase, and I'm using CloudBuild to build and deploy it. My ultimate goal is to embed a version number or commit SHA into the footer of the front page, so we can always confirm which version we're seeing in the browser. Happy to hear alternate implementations, but right now I'm just trying to write a static text file.
I know each step in CloudBuild is a unique container, and only /workspace gets held over through each step. If I execute "pwd," I do see that's where all these steps take place.
I can even write the text file as shown (my date interpolation doesn't work), and see the file exists in the subsequent step. But after the final deployment, it's not there.
- name: gcr.io/cloud-builders/gcloud
entrypoint: /bin/bash
args: ['-c', "echo \"$REVISION_ID (commit $COMMIT_SHA) deployed on `date`\" >> ./static/version.txt"]
- name: 'bash'
args: ['ls', '-lart', './static']
# Deploy
- name: 'gcr.io/cloud-builders/npm:node-10.10.0'
args: ['run', 'deploy']
the ls output shows this:
total 56
drwxr-xr-x 2 root root 4096 Apr 17 20:52 svg
drwxr-xr-x 2 root root 4096 Apr 17 20:52 styles
drwxr-xr-x 2 root root 4096 Apr 17 20:52 plugins
-rw-r--r-- 1 root root 442 Apr 17 20:52 manifest.json
drwxr-xr-x 2 root root 4096 Apr 17 20:52 legal
drwxr-xr-x 2 root root 4096 Apr 17 20:52 js
drwxr-xr-x 4 root root 4096 Apr 17 20:52 images
drwxr-xr-x 2 root root 4096 Apr 17 20:52 gifs
drwxr-xr-x 3 root root 4096 Apr 17 20:52 fonts
-rw-r--r-- 1 root root 6148 Apr 17 20:52 .DS_Store
drwxr-xr-x 12 root root 4096 Apr 17 20:59 ..
-rw-r--r-- 1 root root 132 Apr 17 21:00 version.txt
drwxr-xr-x 10 root root 4096 Apr 17 21:00 .
So I know the version.txt file gets written and persists across steps.
The npm run deploy step just runs firebase deploy. The app deploys, but the version.txt file gives a 404. Notably, I can navigate to <APP_ROOT>/static/manifest.json and open that file in the browser -- but since it is part of the git revision, maybe that doesn't tell me much.
Not sure how to proceed from here. Am I missing something about how CloudBuild works? Is there a better way to do this version thing?
the code will not create the output 'imdiff' but instead will say it can't find imdiff.
dyn896-105:intro sophiejacobs$ pwd
/Users/sophiejacobs/Downloads/preCourse/intro
dyn896-105:intro sophiejacobs$ ls
LThal_mask_func.nii.gz filtered_func_data.nii.gz
LThal_mask_std.nii.gz highres.nii.gz
bighead.nii.gz image0.nii.gz
bvals image1.nii.gz
cst2standard_73_46_26.nii.gz newfmri.nii.gz
diffdata.nii.gz standard.nii.gz
egepi.nii.gz structural.nii.gz
egfmri.nii.gz sub3m0.nii.gz
example_func.nii.gz thresh_zstat1.nii.gz
example_func2highres.mat wrapped.nii.gz
example_func2standard.mat
dyn896-105:intro sophiejacobs$ fslmaths image0 -sub image1 imdiff
libc++abi.dylib: terminating with uncaught exception of type `enter code here`NiftiIO::NiftiException: Error: cant open file imdiff.nii.gz
Abort trap: 6
I expected that image1 would be subtracted from image0 and that that new image would be called imdiff
I think I had the same error and came across your post when trying to fix it
NBrMBP:intro colette$ fslmaths image0 -sub image1 imdiff
libc++abi.dylib: terminating with uncaught exception of type NiftiException: Error: cant open file imdiff.nii.gz
Luckily my supervisor was able to help.
I did not have permission to the directory/folders/files that I downloaded from the FSL tutorial website, but worked after I changed the permissions
cd to the folder that has the files you are trying to use (for me this was a folder called preCourse)
use the command: ls –la
This lists details of the files in the directory. In the left hand column it shows the permissions with dr-xr-xr-x# which means I only had permission to read the files.
e.g:
`NBrMBP:preCourse colette$ ls -la
total 16
dr-xr-xr-x# 3 colette staff 102 21 Jul 2017 fmri
dr-xr-xr-x# 23 colette staff 782 21 Jul 2017 intro`
Use the command: chmod u+w <directoryname>
Run this from the folder above the one you would need permissions from. (u=user w = writing permissions)
e.g NBrMBP:preCourse colette$ chmod u+w intro
Now use ls –la again, it should now show drwxr-xr-x# in the left hand column i
e.g.:
NBrMBP:preCourse colette$ ls -la
total 16
drwx------# 5 colette staff 170 8 Jan 11:55 .
drwxr-xr-x 4 colette staff 136 8 Jan 11:55 ..
-rw-r--r--# 1 colette staff 6148 8 Jan 11:55 .DS_Store
drwxr-xr-x# 3 colette staff 102 21 Jul 2017 fmri
drwxr-xr-x# 26 colette staff 884 8 Jan 15:51 intro
*Note you may need admin permissions on your computer to be able to change the permissions of the read/write/executability of the files.
Hope this helps anyone else who searched the error code!
My username (let’s call it my_name) belongs to the Apache group which is owner of var/www/html directory, sub-directories and files contained within.
In that directory I installed Wordpress. Directories and files permissions are set to 0775 (yeah, I know the files should have 644, but it is not a factor for now).
Well, my username has writing permissions indeed, because I am able to create new files or directories, as well as delete them, by using SSH terminal or WinSCP.
The problem comes up when I run a post-receive hook of a bare git repository, no matter if by running the script or by pushing changes from the local working repository.
In any scenario, the post-receive hook does not work because of permission denied. Really strange and I cannot understand why.
Could you help me please?
Edit:
This is the output of ls -alrth ~/git/devsite.git/hooks directory:
-rwxrwxr-x 1 name apache 896 Apr 2 22:41 commit-msg.sample
-rwxrwxr-x 1 name apache 727 Apr 7 09:09 post-receive
-rwxrwxr-x 1 name apache 189 Apr 2 22:41 post-update.sample
-rwxrwxr-x 1 name apache 398 Apr 2 22:41 pre-applypatch.sample
-rwxrwxr-x 1 name apache 1704 Apr 2 22:41 pre-commit.sample
-rwxrwxr-x 1 name apache 1239 Apr 2 22:41 prepare-commit-msg.sample
-rw-rw-r-- 1 name apache 1348 Apr 2 22:41 pre-push.sample
-rwxrwxr-x 1 name apache 4951 Apr 2 22:41 pre-rebase.sample
-rwxrwxr-x 1 name apache 3611 Apr 2 22:41 update.sample
This is the post-receive script:
#!/bin/sh
TARGET=/var/www/html/wp-content
GIT_DIR=/home/name/git/devsite.git
#run 'post-receive' hook
git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f
Try again after a
cd /path/tp/bare/repo
git config core.sharedRepository true
I mentioned it before in "Permissions with Git Post-Receive".
In the OP's instance, the post-receive script is not placed properly: it should be in ~/git/devsite.git/hooks, not ~/git/devsite.git.
How can check which mup version we are used in meteor?
I am using meteor 1.2.1 version.
mup command is showing below result but there is no command to check mup version.
Meteor Up: Production Quality Meteor Deployments
Valid Actions
init - Initialize a Meteor Up project
setup - Setup the server
deploy - Deploy app to server
reconfig - Reconfigure the server and restart
logs [-f -n] - Access logs
start - Start your app instances
stop - Stop your app instances
restart - Restart your app instances
You can use which mup to find out which mup you are using. Then follow the symbolic link to see where is installed, and check the content of the package.json file
e.g.
➜ ~ which mup
/home/oliver/.nvm/versions/node/v4.8.0/bin/mup
➜ ~ ls -la /home/oliver/.nvm/versions/node/v4.8.0/bin/mup
lrwxrwxrwx 1 oliver oliver 32 Jun 29 10:49 /home/oliver/.nvm/versions/node/v4.8.0/bin/mup -> ../lib/node_modules/mup/index.js
➜ ~ ls -l /home/oliver/.nvm/versions/node/v4.8.0/lib/mup
ls: cannot access '/home/oliver/.nvm/versions/node/v4.8.0/lib/mup': No such file or directory
➜ ~ ls -l /home/oliver/.nvm/versions/node/v4.8.0/lib/node_modules/mup
total 56
-rw-r--r-- 1 oliver oliver 5659 Jun 14 17:19 CHANGELOG.md
-rw-r--r-- 1 oliver oliver 3135 Jun 14 13:21 CONTRIBUTING.md
drwxr-xr-x 8 oliver oliver 4096 Jun 29 10:49 docs
-rwxr-xr-x 1 oliver oliver 65 Mar 11 02:16 index.js
drwxr-xr-x 4 oliver oliver 4096 Jun 29 10:49 lib
drwxr-xr-x 171 oliver oliver 4096 Jun 29 10:49 node_modules
-rw-r--r-- 1 oliver oliver 3972 Jun 29 10:49 package.json
-rw-r--r-- 1 oliver oliver 24283 Jun 14 13:21 README.md
➜ ~ grep _id /home/oliver/.nvm/versions/node/v4.8.0/lib/node_modules/mup/package.json
"_id": "mup#1.2.11",
➜ ~
This might be simple problem. But I am stuck with this for weeks now.
We have an AIX server in which we are facing this issue. I am not able to run programs inside a specific directory and its sub directories.
I am getting proper outputs for commands java and scp2 in /opt/FileNet directory. But when I am in /opt/FileNet/RM directory these commands stops working. Outputs are as below.
Java - JVMXM008: Error occured while initialising System ClassException in thread "main" Could not create the Java virtual machine.
SCP2 - Failed to parse installation path.
I have no idea why this is happening. Your thoughts please.
drwxr-xr-x 24 root system 4096 Feb 21 2012 opt
drwxr-xr-x 17 jxadmin wasadmin 4096 Aug 14 08:40 FileNet
drwxrwxr-x 17 jxadmin wasadmin 4096 Aug 14 08:45 RM
drwxrwxr-x 37 jxadmin wasadmin 4096 Feb 13 2012 AE (/opt/FileNet/AE, This directory is working as expected)
Couldn't find any ACLs.